Home > Code > SQL Server > Drop column in sqlserver using alter table syntax

Drop column in sqlserver using alter table syntax

by Thamilselvanj   on Jan 15, 2012   Category: SQL Server   |  Views: 32    |  Points: 25   |  Silver 



To drop a column in sql server, we can use alter table syntax to drop any column from sql server
table as shown below.

ALTER TABLE table_name
DROP COLUMN column_name --To drop one column

ALTER TABLE table_name
DROP
(column_name1,column_name2) -- To drop many columns


sample query to drop column.

ALTER TABLE emp_name
DROP COLUMN modified_by;
GO

Like this code? Bookmark and Share:

  User Responses | Post Code
 No Response found!
  Recent Posts
* Setting focus to textbox control using JavaScript (240) by Narain_Siddharth on Nov 13 2010 11:25AM
* Sending Mails with Attachements using Asp.Net (280) by Narain_Siddharth on Nov 13 2010 11:48AM
* Disable the Submit button when insert or update a record using JavaScript (198) by Narain_Siddharth on Nov 13 2010 12:31PM
* String comparisons using C#.NET string.compareTo (193) by Thamilselvanj on Nov 14 2010 11:16AM
* String.Split using C# (202) by Thamilselvanj on Nov 14 2010 11:23AM
  Submit feedback about this code snippet
Please sign in to post feedback