ALTER TABLE ... DROP COLUMN

From SQLZOO
Revision as of 15:42, 12 July 2012 by Marek (Talk | contribs) (Created page with "Delete a column from a table <div class='ht'> <div class=params>schema:scott</div> <div> This is in the SQL standard <a href="http://sqlzoo.net/sql92.html#alter_table_statemen...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Delete a column from a table

schema:scott

This is in the SQL standard <a href="http://sqlzoo.net/sql92.html#alter_table_statement">ALTER TABLE</a>

DROP TABLE a
CREATE TABLE a(x INTEGER, y INTEGER);
INSERT INTO a VALUES (1,2);
ALTER TABLE a DROP COLUMN y
ALTER TABLE a DROP y