drop if exists mysql example
Example 1: mysql drop database if exists
DROP DATABASE IF EXISTS database_name;
Example 2: mysql check if value exists
mysql> SELECT EXISTS(SELECT * from ExistsRowDemo WHERE ExistId=105);
DROP DATABASE IF EXISTS database_name;
mysql> SELECT EXISTS(SELECT * from ExistsRowDemo WHERE ExistId=105);