| Data Manipulation |
| |
| SQL ALTER TABLE |
| |
| ALTER TABLE |
| The ALTER TABLE statement is used to add or drop columns in an existing table. |
| |
|
| |
| Note: Some database systems don't allow the dropping of a column in a database table (DROP COLUMN column_name). |
| |
| “ASSOCIATE” TABLE NAME |
| |
|
| |
| |
| Example |
| To add a column named "City" in the "Person" table: |
| |
|
| |
| |
| Result: |
| |
|
| |
| |
| Example |
| To drop the "Address" column in the "Person" table: |
| |
|
| |
| |
| Result: |
| |
|
| |
| |
|
|
| |
| |