CREATE TABLE IF NOT EXISTS vendors (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255)
);
ALTER TABLE vendors
ADD COLUMN phone VARCHAR(15) AFTER name;
UPDATE [LOW_PRIORITY] [IGNORE] table_name
SET
column_name1 = expr1,
column_name2 = expr2,
…
[WHERE condition];
CREATE TABLE IF NOT EXISTS vendors (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255)
);
ALTER TABLE vendors
ADD COLUMN phone VARCHAR(15) AFTER name;
ALTER TABLE table_name
ADD new_column_name column_definition
[ FIRST | AFTER column_name ],
ADD new_column_name column_definition
[ FIRST | AFTER column_name ],
...
;
CREATE TABLE IF NOT EXISTS vendors (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255)
);
ALTER TABLE vendors
ADD COLUMN phone VARCHAR(15) AFTER name;
UPDATE [LOW_PRIORITY] [IGNORE] table_name
SET
column_name1 = expr1,
column_name2 = expr2,
…
[WHERE condition];
CREATE TABLE IF NOT EXISTS vendors (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255)
);
ALTER TABLE vendors
ADD COLUMN phone VARCHAR(15) AFTER name;
ALTER TABLE table_name
ADD new_column_name column_definition
[ FIRST | AFTER column_name ],
ADD new_column_name column_definition
[ FIRST | AFTER column_name ],
...
;