EN
MySQL - how to create database only if not exists?
1 answers
0 points
How can I create a database only if it doesn't exist yet in MySQL?
1 answer
0 points
I found a solution:
We can use the following syntax so we won't get errors while trying to create a database that already exists:
xxxxxxxxxx
1
CREATE DATABASE IF NOT EXISTS `database_name`;
Check the article below to see some practical examples:
0 commentsShow commentsAdd comment