Hello
Is it possible to test if a certain database has been created using SQL?
if so, how can it be done?
The query is obvisouly on the MySQL level and not on a certain database.
thanks
how to check if a database has been created
Moderator: General Moderators
-
davidklonski
- Forum Contributor
- Posts: 128
- Joined: Mon Mar 22, 2004 4:55 pm
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Code: Select all
SHOW STATUS TABLE LIKE 'tablename'Code: Select all
CREATE TABLE IF NOT EXISTS .........-
davidklonski
- Forum Contributor
- Posts: 128
- Joined: Mon Mar 22, 2004 4:55 pm
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
hmm I could have swore you said table.. 
Code: Select all
SHOW DATABASES їLIKE 'pattern']