By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
460,028 Members | 815 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 460,028 IT Pros & Developers. It's quick & easy.

Check if field already exist

P: n/a
How can I check if a field already exist in a table? If it doesn't exist I want
to add it with ALTER TABLE ADD...
Jul 19 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
SR
On 2 Feb 2004 04:53:49 -0800, Roger wrote:
How can I check if a field already exist in a table? If it doesn't exist I want
to add it with ALTER TABLE ADD...


Check the output of:

explain <table_name>;

and see if the string returned contains the field name; if not fire up the
alter table statement.
Jul 19 '05 #2

P: n/a
SR
On 2 Feb 2004 04:53:49 -0800, Roger wrote:
How can I check if a field already exist in a table? If it doesn't exist I want
to add it with ALTER TABLE ADD...


Check the output of:

explain <table_name>;

and see if the string returned contains the field name; if not fire up the
alter table statement.
Jul 19 '05 #3

P: n/a
SR
On 2 Feb 2004 04:53:49 -0800, Roger wrote:
How can I check if a field already exist in a table? If it doesn't exist I want
to add it with ALTER TABLE ADD...


Check the output of:

explain <table_name>;

and see if the string returned contains the field name; if not fire up the
alter table statement.
Jul 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.