Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drop a column

Status
Not open for further replies.

SonJ

Programmer
Oct 24, 2002
166
GB
hi,

does anyone know of a sql command which lets you drop a column in table? so far, i have been unsuccessful in finding a one-liner command that lets me do this.

thanks in advance,
SonD
 
Code:
alter table t drop column c restrict
-- or
alter table t drop column c cascade

is the ANSI SQL syntax.

There may be local variations, e.g. no support for restrict or cascade.

Some may also not recognize the keyword column. So check the documentation for your DBMS.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top