How can I check if mysql table field even exists ?
The column name is \'price\' and I need to see if it exists.
Haven\'t understood really how the \'EXISTS\'
Try:
IF NOT EXISTS (SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'TEST' AND COLUMN_NAME = 'Price') BEGIN -- do something, e.g. -- ALTER TABLE TEST ADD PRICE DECIMAL END