May 2020
Beginner
564 pages
14h 9m
English
In order to create a table, you can use the following sample syntax. The items in square brackets are optional:
CREATE TABLE schemaname.tablename (col1name datatype [constraintinfo] [AUTO_INCREMENT],col2name datatype [constraintinfo],...colNname datatype [constraintinfo][PRIMARY KEY (col1name),][UNIQUE KEY uniquekeyname (col1name),]);
You can alter a table in several different ways, as follows:
ALTER TABLE tablenameADD COLUMN colname datatype [constraintinfo] [AFTER othercolname];
ALTER TABLE tablenameADD COLUMN col1name datatype [constraintinfo] [AFTER othercolname], ADD COLUMN col2name datatype [constraintinfo] [AFTER ...
Read now
Unlock full access