|
Once a table is created in the database, there are many occasions where one may wish to change the structure of the table. In general, the SQL syntax for ALTER TABLE is
ALTER TABLE "table_name"
[alter specification]
[alter specification] is dependent on the type of alteration we wish to
perform. We list a number of common changes below:
ALTER TABLE Add Column
ALTER TABLE Modify Column
ALTER TABLE Rename Column
ALTER TABLE Drop Column
ALTER TABLE Add Index
ALTER TABLE Drop Index
ALTER TABLE Add Constraint
ALTER TABLE Drop Constraint
For all cases, examples are provided for MySQL, Oracle, and SQL Server.
ALTER TABLE ADD COLUMN >>
Link to this page: If you find this page useful, we encourage you to link to this page. Simply copy and paste the code below to your website, blog, or profile.
Copyright © 2012 1keydata.com All Rights Reserved. Privacy Policy
|