Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove a column from an existing table?

Tags:

sql-server

How to remove a column from an existing table?

I have a table MEN with Fname and Lname

I need to remove the Lname

How to do it?

like image 410
Gali Avatar asked Apr 11 '11 19:04

Gali


People also ask

How do I drop a column from a view in SQL?

You cannot use ALTER VIEW for removing a column. To recreate the view without the column, use CREATE OR REPLACE VIEW . From the Oracle documentation: Use the ALTER VIEW statement to explicitly recompile a view that is invalid or to modify view constraints.


1 Answers

ALTER TABLE MEN DROP COLUMN Lname 
like image 149
jcomeau_ictx Avatar answered Nov 13 '22 23:11

jcomeau_ictx