Skip to content

Latest commit

 

History

History
28 lines (25 loc) · 630 Bytes

Alter-Table.md

File metadata and controls

28 lines (25 loc) · 630 Bytes

Keyword ALTER TABLE

Syntax:

    ALTER TABLE tableid ADD COLUMN columnid type;
    ALTER TABLE tableid RENAME COLUMN columnid TO newname;
    ALTER TABLE tableid DROP COLUMN columnid;
    ALTER TABLE tableid RENAME TO newname;

ADD COLUMN

    alasql('ALTER TABLE City ADD COLUMN Continent STRING�');

RENAME COLUMN

    alasql('ALTER TABLE City RENAME COLUMN Continent TO WorldPart�');

DROP COLUMN

    alasql('ALTER TABLE City DROP COLUMN Continent�');

RENAME TO

   alasql('ALTER TABLE City RENAME TO Capital');

See also: [ADD COLUMN](Add Column), [RENAME TABLE](Rename Table)