How to remove a column from an existing table in SQL Server?

Published on August 31, 2016 by abundantcode

Filed under SQL Server

Last modified August 31, 2016

Print this page

rate 1 star rate 2 star rate 3 star rate 4 star rate 5 star
Your rating: none, Average: 0 (0 votes)

This article have been viewed 3699 times

Use the DDL (Data definition language) query to remove a column from an existing table in SQL Server.

How to remove a column from an existing table in SQL Server?

ALTER command will allow the user to remove a column from the table.

Syntax to remove the column from the table.

ALTER TABLE <tablename> DROP COLUMN <columnname>;

For example , assume that you have a table called Person and want to remove the column named "FName" from the Person table. Here’s the query for the same.

ALTER TABLE Person DROP COLUMN FName

Leave a Comment


x

You might be Interested in these Posts

C Program to find the G.C.D of a number using Recursive function

Problem Write a program in C to find the find the G.C.D of a number using recursion and display the ...

C Program to print a Half Pyramid using *

Problem Write a program in C to print Half pyramid using * as shown. * * * * * * * * * * ...

C Program to display Positive factors of a number

Problem Write a program in C to display all the positive factors of a number enter by the user. Ho...