Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Prefixo PK + Nome da tabela.

  2. Exemplo:

CREATE TABLE Cliente( identificador INT NOT NULL CONSTRAINT PK_

...

Cliente PRIMARY KEY);

🗝️ Foreign Key

  • A constraint Foreign Key será nomeada conforme:

...

Tipo de Dados

SQL Server

Numérico

Tinyint, Int, Smallint, Bigint

Texto

Varchar(n)

Data

Date, DatetimeDatetime2(3)

Binário

BIT (0, 1, NULL)

Valor Monetário

Decimal(n,m)

Caractere

Char(1)

...