Difference between revisions of "ALTER TABLE ... ADD COLUMN"

From SQLZOO
Jump to: navigation, search
Line 4: Line 4:
 
<div>
 
<div>
 
This is in the SQL standard
 
This is in the SQL standard
<a href="http://sqlzoo.net/sql92.html#alter_table_statement">ALTER TABLE</a>
+
[http://sqlzoo.net/sql92.html#alter_table_statement ALTER TABLE]
 
The term COLUMN is optional.
 
The term COLUMN is optional.
 
</div>
 
</div>

Revision as of 14:01, 17 July 2012

Add a column to a table

schema:scott

This is in the SQL standard ALTER TABLE The term COLUMN is optional.

DROP TABLE a
CREATE TABLE a(x INTEGER, y INTEGER);
INSERT INTO a VALUES (1,2);
ALTER TABLE a ADD COLUMN z INTEGER
ALTER TABLE a ADD z INTEGER
Personal tools
Namespaces

Variants
Actions
Reference
Toolbox
Google AdSense