RaposoTKD

SQL (table_clientes)

May 18th, 2012
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.33 KB | None | 0 0
  1. CREATE TABLE clientes
  2. {
  3.     matricula serial PRIMARY KEY, /* "serial" gera automaticamente o valor da variável, só é possível existir um serial por tabela e este não pode ser de uma Foreign Key */
  4.     nome      VARCHAR(30) NOT NULL,
  5.     endereco  VARCHAR(50) NOT NULL,
  6.     CONSTRAINT fkCidade FOREIGN KEY(cidade) REFERENCES cidade(codigo)
  7. }
Advertisement
Add Comment
Please, Sign In to add comment