| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Ryan Stille | Date: | October 6 2005 6:12pm |
| Subject: | RE: Detect if table exists from within MySQL? | ||
| View as plain text | |||
> Maybe you could use > > SHOW TABLES LIKE 'your_table'; That's a great idea, I just tried it in several ways, like: IF EXISTS (SHOW TABLES LIKE 'cfgbiz') THEN SELECT siacnotifyto FROM cfgbiz ELSE SELECT '' as siacnotifyto END IF; -and- select IF((SHOW TABLES LIKE 'cfgbiz'),notifyto,'') FROM cfgbiz; But it looks like the SHOW TABLES statement just doesn't return like a regular SELECT statement does, because the above works if I use it like this: select IF(1,notifyto,'') FROM cfgbiz; -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 |
