In this video, you will learn how to add and drop columns in SQL tables using the ALTER TABLE statement.
Topics covered:
How to add a new column in SQL
How to delete/drop a column
syntax
-- Add Column Syntax
ALTER TABLE table_name
ADD column_name datatype;
alter table [Employee Data]
add department varchar(20)
-- Drop Column Syntax
ALTER TABLE table_name
DROP COLUMN column_name;
alter table [Employee Data]
drop column department