C'è qualcuno che cortesemente mi spiega a cosa serve questo comando dell'sql? è nella sintassi
nome_campo tipo constraint nome primary key,
C'è qualcuno che cortesemente mi spiega a cosa serve questo comando dell'sql? è nella sintassi
nome_campo tipo constraint nome primary key,
[url=http://narutofantasyheart.forumcommunity.net/?t=9346526&st=0]
Rende il/i campo/i la primary key della tabella.
E' il vincolo piu' importante dell'SQL ed equivale all'unione di NOT NULL e UNIQUE.
Parlare di SQL e non sapere cos'e' una chiave primaria pero' non è bello.
Tanek™: Game Designer & Algorithm Mastermind, Team Leader & SW Engineer and Dungeon Master!
"Datte Foco"™ and "Ma KITTESENCULA"™ are registered trademarks of Tanek Entertainment Inc.
"One of these days, scientists will discover that second X chromosome contains nothing but nonsense and twaddle." - Sheldon Cooper
Per non dimenticare:Spoiler
Mah..
Cmq la sintassi corretta è:
ALTER TABLE nome_tabella
ADD CONSTRAINT nome_chiave PRIMARY KEY (nome_campo);
(Google, secondo link copiato/incollato)
Tanek™: Game Designer & Algorithm Mastermind, Team Leader & SW Engineer and Dungeon Master!
"Datte Foco"™ and "Ma KITTESENCULA"™ are registered trademarks of Tanek Entertainment Inc.
"One of these days, scientists will discover that second X chromosome contains nothing but nonsense and twaddle." - Sheldon Cooper
Per non dimenticare:Spoiler