mariadb alter table code example
Example 1: mariadb alter table add column if not exists example
ALTER TABLE tableName ADD COLUMN IF NOT EXISTS colName INT;
Example 2: mariadb alter table modify column
ALTER TABLE clients
CHANGE address address1 varchar(40),
MODIFY active enum('yes','no','AC','IA');
UPDATE clients
SET active = 'yes'
WHERE active = 'AC';
UPDATE clients
SET active = 'no'
WHERE active = 'IA';
ALTER TABLE clients
MODIFY active enum('yes','no');