ALTER TABLE vendors ADD COLUMN phone VARCHAR(15) AFTER name;
ALTER TABLE Table_name
ADD Email varchar(255);
ALTER TABLE `TABLE_NAME`
ADD `COLUMN_NAME` VARCHAR(50) NULL
AFTER `COLUMN_NAME_AFTER`;
ALTER TABLE Table_name ADD name_column INT(255);
ALTER TABLE table_name
ADD [COLUMN] column_name column_definition [FIRST|AFTER existing_column];
-- ALTER TABLE tbl_name ADD COLUMN column_name column_definition
-- [FIRST|AFTER existing_column];
ALTER TABLE office ADD COLUMN phone VARCHAR(200) DEFAULT '000' AFTER name;
ALTER TABLE office ADD COLUMN flag INT(1) FIRST;
ALTER TABLE office ADD COLUMN last_col INT(2); -- Last column is default position
-- ↓ Test it (Fiddle)
ALTER TABLE contacts
ADD last_name varchar(40) NOT NULL
AFTER contact_id;
ALTER TABLE table
ADD [COLUMN] column_name_1 column_1_definition [FIRST|AFTER existing_column],
ADD [COLUMN] column_name_2 column_2_definition [FIRST|AFTER existing_column],
...
;
ALTER TABLE table ADD [COLUMN] column_name column_definition [FIRST|AFTER existing_column];
ALTER TABLE table
ADD [COLUMN] column_name column_definition
[FIRST|AFTER existing_column];
ALTER TABLE table
ADD [COLUMN] column_name column_definition [FIRST|AFTER existing_column];
Code language: SQL (Structured Query Language) (sql)
ALTER TABLE <table_name> CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;