How to add and drop a column to a table in SQL SERVER? This is a simple Post and it may help beginners in SQL Server.
- Add a Column
ALTER TABLE [TableName] ADD [ColumnName] [DATATYPE]
ALTER TABLE mainschema.testtable ADD [State] INT
- Drop a Column
ALTER TABLE [TableName] DROP COLUMN [ColumnName]
ALTER TABLE mainschema.testtable DROP COLUMN [State]
smrithi
14 years agoGood varun…Helpfull for beginers
lekshmi
14 years agoHi Varun,
This is a gud post especially for beginners like me.
lekshmi
14 years agoDear VArun,
Can u pls update blog with some interview questions.This may usefull for many ppls.