Ajouter une nouvelle colonne à la table mysql
ALTER TABLE `TABLE_NAME`
ADD `COLUMN_NAME` VARCHAR(50) NULL
AFTER `COLUMN_NAME_AFTER`;
Lokesh003Coding
ALTER TABLE `TABLE_NAME`
ADD `COLUMN_NAME` VARCHAR(50) NULL
AFTER `COLUMN_NAME_AFTER`;
-- 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 table
ADD [COLUMN] column_name column_definition
[FIRST|AFTER existing_column];