|
LastName |
FirstName |
Address |
City |
AGE |
ABC |
EFG |
1, |
|
|
XYZ |
EFG |
3, |
|
|
EFG |
ABC |
2, |
|
|
LastName |
FirstName |
Address |
ABC |
EFG |
1, |
XYZ |
EFG |
3, |
EFG |
ABC |
2, |
ALTER |
The ALTER statement is used to add or drop columns in an existing table. The syntax of the ALTER statement is ALTER TABLE <table name> ADD <column name, data type> ALTER TABLE <table name> DROP COLUMN<column name> To add a column AGE to the Student table we use the following query ALTER TABLE Student ADD AGE varchar |
To drop a column City from the Student table we use the following query ALTER TABLE Student DROP COLUMN City |