Eine Einführung in
SQL
Add a column to a table
SQLite
This is in the SQL standard
ALTER TABLE
The term COLUMN is optional.
Execute tidy up
code
silently
DROP TABLE a
Execute set up
code
CREATE TABLE a(x INTEGER, y INTEGER); INSERT INTO a VALUES (1,2);
ALTER TABLE a ADD z INTEGER
Specific to SQLite
none
DB2
This is in the SQL standard
ALTER TABLE
The term COLUMN is optional.
Execute tidy up
code
silently
DROP TABLE a
Execute set up
code
CREATE TABLE a(x INTEGER, y INTEGER); INSERT INTO a VALUES (1,2);
ALTER TABLE a ADD z INTEGER
Specific to DB2
ALTER TABLE documentation.
DB2 seemingly does not permit this operation - any help would be appreciated.
MS Access
This is in the SQL standard
ALTER TABLE
The term COLUMN is optional.
Execute tidy up
code
silently
DROP TABLE a
Execute set up
code
CREATE TABLE a(x INTEGER, y INTEGER); INSERT INTO a VALUES (1,2);
ALTER TABLE a ADD z INTEGER
Specific to MS Access
none
PostgreSQL
This is in the SQL standard
ALTER TABLE
The term COLUMN is optional.
Execute tidy up
code
silently
DROP TABLE a
Execute set up
code
CREATE TABLE a(x INTEGER, y INTEGER); INSERT INTO a VALUES (1,2);
ALTER TABLE a ADD z INTEGER
Specific to PostgreSQL
ALTER TABLE
Oracle
This is in the SQL standard
ALTER TABLE
The term COLUMN is optional.
Execute tidy up
code
silently
DROP TABLE a
Execute set up
code
CREATE TABLE a(x INTEGER, y INTEGER); INSERT INTO a VALUES (1,2);
ALTER TABLE a ADD z INTEGER
Specific to Oracle
none
MS SQL Server
This is in the SQL standard
ALTER TABLE
The term COLUMN is optional.
Execute tidy up
code
silently
DROP TABLE a
Execute set up
code
CREATE TABLE a(x INTEGER, y INTEGER); INSERT INTO a VALUES (1,2);
ALTER TABLE a ADD z INTEGER
Specific to MS SQL Server
Sybase and SQL Server do not permit the COLUMN keyword.
MySQL
This is in the SQL standard
ALTER TABLE
The term COLUMN is optional.
Execute tidy up
code
silently
DROP TABLE a
Execute set up
code
CREATE TABLE a(x INTEGER, y INTEGER); INSERT INTO a VALUES (1,2);
ALTER TABLE a ADD z INTEGER
Specific to MySQL
none
Sybase
This is in the SQL standard
ALTER TABLE
The term COLUMN is optional.
Execute tidy up
code
silently
DROP TABLE a
Execute set up
code
CREATE TABLE a(x INTEGER, y INTEGER); INSERT INTO a VALUES (1,2);
ALTER TABLE a ADD z INTEGER
Specific to Sybase
Sybase and SQL Server do not permit the COLUMN keyword.
Mimer SQL
This is in the SQL standard
ALTER TABLE
The term COLUMN is optional.
Execute tidy up
code
silently
DROP TABLE a
Execute set up
code
CREATE TABLE a(x INTEGER, y INTEGER); INSERT INTO a VALUES (1,2);
ALTER TABLE a ADD z INTEGER
Specific to Mimer SQL
none