| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Ryan Stille | Date: | October 6 2005 3:57pm |
| Subject: | Detect if table exists from within MySQL? | ||
| View as plain text | |||
I am converting some code from MSSQL to MySQL. In one place I need to
have a conditional query depending on if a table exists or not. There
are different versions of this application and the table only exists in
some of them. Here is how it was done in MSSQL:
IF OBJECT_ID('cfgbiz') IS NOT NULL
SELECT notifyto FROM cfgbiz
ELSE
SELECT '' as notifyto
Is there something similar in MySQL? I am running version 4.1.x.
Thanks,
-Ryan
| Thread | ||
|---|---|---|
| • Detect if table exists from within MySQL? | Ryan Stille | 6 Oct |
| • Re: Detect if table exists from within MySQL? | Peter Brawley | 6 Oct |
| • A question about stored procedures | Leonardo Javier BelĂ©n | 6 Oct |
| • Re: A question about stored procedures | Gleb Paharenko | 7 Oct |
| • Re: Detect if table exists from within MySQL? | Jeff Smelser | 6 Oct |
| • RE: Detect if table exists from within MySQL? | Ryan Stille | 6 Oct |
| • Re: Detect if table exists from within MySQL? | Keith Ivey | 6 Oct |
| • RE: A question about stored procedures | Sujay Koduri | 6 Oct |
| • RE: Detect if table exists from within MySQL? | Ryan Stille | 6 Oct |
