29.10.2018, 22:43
MySQL doesn't have the if exists function for that so what you'll have to do is:
Select the name of the column you're planning to create, if it returns a result, then the column exist, else you can go ahead and alter table.
Select the name of the column you're planning to create, if it returns a result, then the column exist, else you can go ahead and alter table.