SQL > ???? > Alter Table

??? ???? ??? ?? ??? ??? ??? ??? ??? ?? ???? ????. ???? ??? ??? ????:

  • ?? ?? ??
  • ?? ?? ??
  • ?? ?? ??
  • ??? ??? ?? ??

?? ??? ???? ?? ??? ??? ????. ALTER TABLE ? ?? ?? ???? ???? ????. ?? ?? ??? ?? ??.

ALTER TABLE ? ??? ??? ????:

ALTER TABLE "???"
[????];

[????] ? ??? ????? ??? ????? ??? ?? ??? ????.?? ??? ????? [????] ? ??? ????:

  • ???? ??: ADD "?? 1" "??1 ?????"
  • ???? ??: DROP "?? 1"
  • ?? ?? ??: CHANGE "????" "????" "???? ?????"
  • ?? ??? ?????: MODIFY "?? 1" "? ?????"

?? ??? CREATE TABLE ????? ?? Customer ??? ?? ???:

Customer ??
????????
First_Namechar(50)
Last_Namechar(50)
Addresschar(50)
Citychar(50)
Countrychar(25)
Birth_Datedatetime

??, "Gender" ?? ?? ??? ?????. ?? ??????? ???? ????:

ALTER TABLE Customer ADD Gender char(1);

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

Customer ??
????????
First_Namechar(50)
Last_Namechar(50)
Addresschar(50)
Citychar(50)
Countrychar(25)
Birth_Datedatetime
Genderchar(1)

???? ??? "Address" ??? "Addr" ? ?????. ??? ?? ??????? ???? ????:

ALTER TABLE Customer CHANGE Address Addr char(50);

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

Customer ??
????????
First_Namechar(50)
Last_Namechar(50)
Addrchar(50)
Citychar(50)
Countrychar(25)
Birth_Datedatetime
Genderchar(1)

??? ???"Addr" ??? ??? ??? char(30) ?? ????. ??? ?? ??????? ???? ????:

ALTER TABLE Customer MODIFY Addr char(30);

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

Customer ??
????????
First_Namechar(50)
Last_Namechar(50)
Addrchar(30)
Citychar(50)
Countrychar(25)
Birth_Datedatetime
Genderchar(1)

????? ???"Gender" ??? ?????. ??? ?? ??????? ???? ????:

ALTER TABLE Customer DROP Gender;

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

Customer ??
????????
First_Namechar(50)
Last_Namechar(50)
Addrchar(30)
Citychar(50)
Countrychar(25)
Birth_Datedatetime

SQL ??? >>
?


Copyright © 2021   1keydata.com   All Rights Reserved