Skip to content

Instantly share code, notes, and snippets.

@wesleysantossts
Last active February 23, 2023 17:36
Show Gist options
  • Select an option

  • Save wesleysantossts/e93f15a78f5e542b1867430b4c2e5ae9 to your computer and use it in GitHub Desktop.

Select an option

Save wesleysantossts/e93f15a78f5e542b1867430b4c2e5ae9 to your computer and use it in GitHub Desktop.
Principais comandos em SQL.

COMANDOS

Básicos

Criação

Criar um banco de dados

CREATE DATABASE ;

Criar uma tabela

  • Exemplo: CREATE TABLE MyTable (id int, name varchar(10));

CREATE TABLE (nomeColuna tipo);

Criar um index

  • Exemplo: CREATE INDEX IndexName ON TableName(col1);

CREATE INDEX ON nomeTabelaDesejada(nomeColunaDesejada);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment