Re: SQL for detecting if Column/Index already exists?

2004-09-23 Thread Kyle Kirkland
On Thu, 23 Sep 2004 17:20:17 -0700, Kyle Kirkland <[EMAIL PROTECTED]> wrote: > > Any chance 'IF EXISTS' being added to the 'ALTER TABLE' statements? > It sure would be nice to execute something like: > > ALTER TABLE tmp ADD INDEX joy ( to, the, world ) IF EXISTS; > Make that 'IF NOT EXISTS'. S

RE: SQL for detecting if Column/Index already exists?

2004-09-23 Thread Kyle Kirkland
At 4:00 7/27/04, Paul DuBois wrote: > >At 16:22 -0500 7/26/04, Ghate, Shishir wrote: >>I looked at the SHOW COLUMNS statement and they have what I want, >>but I need to condition off them. For example, I don't want to >>execute an ALTER TABLE command to add a column if that column is >>already

RE: SQL for detecting if Column/Index already exists?

2004-07-26 Thread Paul DuBois
ay, July 26, 2004 2:21 PM To: Ghate, Shishir; [EMAIL PROTECTED] Subject: Re: SQL for detecting if Column/Index already exists? At 14:08 -0500 7/26/04, Ghate, Shishir wrote: Hello, I am trying to write a db creation script that will create a database as a well as repair an existing database. What I can&#

RE: SQL for detecting if Column/Index already exists?

2004-07-26 Thread Ghate, Shishir
EMAIL PROTECTED] Subject: Re: SQL for detecting if Column/Index already exists? At 14:08 -0500 7/26/04, Ghate, Shishir wrote: >Hello, > >I am trying to write a db creation script that will create a >database as a well as repair an existing database. What I can't >seem to find is

Re: SQL for detecting if Column/Index already exists?

2004-07-26 Thread Paul DuBois
At 14:08 -0500 7/26/04, Ghate, Shishir wrote: Hello, I am trying to write a db creation script that will create a database as a well as repair an existing database. What I can't seem to find is a set of key words that will allow me to detect if a column or index already exists in a table and th

SQL for detecting if Column/Index already exists?

2004-07-26 Thread Ghate, Shishir
Hello, I am trying to write a db creation script that will create a database as a well as repair an existing database. What I can't seem to find is a set of key words that will allow me to detect if a column or index already exists in a table and thus skip the creation of the column or index.