SQL ALTER TABLE
The ALTER TABLE statement is used to add, delete, or modify columns in an existing table.
To add a column in a table
ALTER TABLE table_name ADD column_name datatype
To delete a column in a table
ALTER TABLE table_name DROP COLUMN column_name
To change the data type of a column in a table.
SQL Server / MS Access:
ALTER TABLE table_name ALTER COLUMN column_name datatype
My SQL / Oracle (prior version 10G):
ALTER TABLE table_name MODIFY COLUMN column_name datatype
Oracle 10G and later:
ALTER TABLE table_name MODIFY column_name datatype
Learn how to use SQL to store, query, and manipulate data. SQL is a special-purpose programming language designed for managing data in a relational database, and is used by a huge number of apps and organizations.
- Lectures 41
- Quizzes 0
- Duration 50 hours
- Skill level All levels
- Language English
- Students 0
- Certificate No
- Assessments Self