Question What is the SQL syntax to check if there's a database or not?

capedech

Well-known member
Joined
Oct 29, 2008
Messages
62
Programming Experience
Beginner
Hi,
I want to ask, What is the SQL syntax to check if there's a database or not?
I'm making an application using MySQL as the database.
In the splashscreen, I want to make a validation to check if there's a database or not, so that I can make the database programmaticaly if it doesn't have the database.

I am thinking using Try Catch, but I don't know what is the SQL Syntax.

Thanks in Advance.

Regards,
 
For MySQL only:

make sure you are connected to the "mysql" database.

You can obtain a list of databases for the server using the following query:

VB.NET:
SELECT Db FROM db
 
Back
Top