mirror of
https://github.com/janishutz/eth-summaries.git
synced 2026-07-27 21:29:09 +02:00
[DMDB] SQL intro (DML, DDL)
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
ALTER TABLE TableName ADD COLUMN (col integer);
|
||||
ALTER TABLE TableName ADD COLUMN (AnotherColumn integer default "");
|
||||
ALTER TABLE TableName DROP COLUMN AnotherColumn;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
CREATE TABLE TableName (
|
||||
Attribute integer,
|
||||
OtherAttribute varchar (30),
|
||||
NextAttribute character (2) default "AP",
|
||||
PRIMARY KEY (Attribute)
|
||||
NextAttribute character (2) default "AP", -- default value, if unset on insert
|
||||
PRIMARY KEY (Attribute) -- primary key, as in RA
|
||||
);
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
DROP TABLE TableName;
|
||||
|
||||
Reference in New Issue
Block a user