(MySQL) Add column if not exists?
#2

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.
Reply


Messages In This Thread
(MySQL) Add column if not exists? - by ByMatt20030 - 29.10.2018, 22:30
Re: (MySQL) Add column if not exists? - by TheToretto - 29.10.2018, 22:43
Re: (MySQL) Add column if not exists? - by ByMatt20030 - 29.10.2018, 23:01
Re: (MySQL) Add column if not exists? - by Jefff - 30.10.2018, 00:08
Re: (MySQL) Add column if not exists? - by corne - 30.10.2018, 07:07
Re: (MySQL) Add column if not exists? - by TheToretto - 30.10.2018, 07:22
Re: (MySQL) Add column if not exists? - by ByMatt20030 - 30.10.2018, 16:41

Forum Jump:


Users browsing this thread: 1 Guest(s)