In order to delete the column you need to open the table in Design and right click on the column and click on delete. For reference follow the image below
To Drop (delete) the column using the script execute the script below:
IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'tblFaculty' AND COLUMN_NAME = 'aaa')
BEGIN
Alter table tblFaculty
drop column aaa
END
IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'tblFaculty' AND COLUMN_NAME = 'aaa')
BEGIN
Alter table tblFaculty
drop column aaa
END
No comments:
Post a Comment