question

suri avatar image
suri asked

How to delete a column from a table

How do I delete a column from a table?

ddlexisting-table
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Fatherjack avatar image
Fatherjack answered
ALTER TABLE Foo DROP COLUMN Bar
4 comments
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

how's about preceding that with BACKUP DATABASE :)
6 Likes 6 ·
@Kev - how's about asking a question that includes the word 'PLEASE'? !!
1 Like 1 ·
+ 1 to Kev. But I do like Fatherjack's choice of table & column names.
0 Likes 0 ·
Backup database would be nice - or one could simply make a copy of the table and then drop the column.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.