-
Notifications
You must be signed in to change notification settings - Fork 664
Alter Table
Mathias Rangel Wulff edited this page Jun 11, 2015
·
3 revisions
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)
© 2014-2024, Andrey Gershun & Mathias Rangel Wulff
Please help improve the documentation by opening a PR on the wiki repo