MySQL Forums
Forum List  »  Quality Assurance

Adding field to table
Posted by: Henrik Mortensen
Date: March 22, 2008 11:42AM


I'm a bit newbie to MySQL. But I need to figure out if it's possible to check a table if a certain field exist. If the field dosent exist then I need to add the field to the existing table. I figured out the SQL for adding the field, but not how to control if the field exists.

ALTER TABLE `hobsraid_users`
ADD `email` varchar(50);

Hope anyone can give me a hint with this, thx in advance

Options: ReplyQuote

Written By
Adding field to table
March 22, 2008 11:42AM
March 30, 2008 03:07PM
April 14, 2008 11:24AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.