Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 4 of 4 total |
Column Exists |
Mon, Jul 30 2007 5:34 PM | Permanent Link |
Michael Thompson | Is there a way to find out if a column exists in a table.
I am trying a statement like this If column does not exist then alter table etc... I'm doing it right now with try except but there has to be a cleaner way. |
Mon, Jul 30 2007 8:59 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Michael,
<< Is there a way to find out if a column exists in a table. >> Use a query on the Information schema table TableColumns: SQLString:='SELECT * FROM Information.TableColumns '+ 'WHERE TableName=''MyTable'' AND Name=''MyColumn'''; if (MyEDBDatabase.Execute(SQLString)=0) then // Execute ALTER TABLE http://www.elevatesoft.com/edb1sql_tablecolumns_table.htm http://www.elevatesoft.com/edb1d7_querying_database_objects.htm -- Tim Young Elevate Software www.elevatesoft.com |
Tue, Jul 31 2007 3:10 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Tim
When is EXISTS likely to make a reappearance? Roy Lambert |
Tue, Jul 31 2007 8:49 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Roy,
<< When is EXISTS likely to make a reappearance? >> I'm not sure if it is yet, but I'll look into it further here as I move along with 1.06. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Tuesday, April 30, 2024 at 03:55 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |