Is there a way to check if a database exists?

1
Bettye Altenwerth asked a question: Is there a way to check if a database exists?
Asked By: Bettye Altenwerth
Date created: Mon, Jul 5, 2021 11:31 AM
Date updated: Sat, Sep 24, 2022 1:51 PM

Content

Top best answers to the question «Is there a way to check if a database exists»

  • A simple way to check if a database exists is: SHOW DATABASES LIKE 'dbname'; If database with the name 'dbname' doesn't exist, you get an empty set. If it does exist, you get one row.

Your Answer