SQL > ???? > ???

??? (Primary Key) ?? ?? ???? ?? ????? ??? ???. ????? ??? ??? ???? ???? ??? ???? ????????. ??? (Primary Key) ? ? ???? ??? ?? ??? ??? ?? ?? (? ???? ???? ??) ?? ????. ???? ?? ?? ???? ??? ???? ????. ???? ???? ??? ????? ???(Composite Key) ?? ????.

???? ???? ???? ?? (CREATE TABLE ?? ??) ?? ?? ?? ??? ???? ???? ?? (ALTER TABLE??) ???.

??? ? ??? ??? ??? ????? ?????:

MySQL:

CREATE TABLE Customer
(SID integer,
Last_Name varchar(30),
First_Name varchar(30),
PRIMARY KEY (SID));

Oracle:

CREATE TABLE Customer
(SID integer PRIMARY KEY,
Last_Name varchar(30),
First_Name varchar(30));

SQL Server:

CREATE TABLE Customer
(SID integer PRIMARY KEY,
Last_Name varchar(30),
First_Name varchar(30));

??? ?? ????? ???? ???? ???? ?????:

MySQL:

ALTER TABLE Customer ADD PRIMARY KEY (SID);

Oracle:

ALTER TABLE Customer ADD PRIMARY KEY (SID);

SQL Server:

ALTER TABLE Customer ADD PRIMARY KEY (SID);

ALTER TABLE??? ???? ?? ?? ???? ?? ??? ???? ???? ??? ??? [NOT NULL] ?? ????? ??? ; ?, ? ??? ???? ???? ?????? ???? ???.

SQL ??? >>
?


Copyright © 2021   1keydata.com   All Rights Reserved