Here is the format which can be used to remove one or more columns from an already existing table:
ALTER TABLE table-name
DROP COLUMN column-name
Now lets implement it with a table Student which have following fields:
ID,
First Name,
Last Name,
Middle Name,
Address
Lets say we want to remove Middle Name
So we will use the following query:
ALTER TABLE Student
DROP COLUMN Middle Name
Hope you have got the idea how to delete the columns from an existing table.
ALTER TABLE table-name
DROP COLUMN column-name
Now lets implement it with a table Student which have following fields:
ID,
First Name,
Last Name,
Middle Name,
Address
Lets say we want to remove Middle Name
So we will use the following query:
ALTER TABLE Student
DROP COLUMN Middle Name
Hope you have got the idea how to delete the columns from an existing table.
No comments:
Post a Comment