开发者社区 问答 正文

mysql删除一个不存在的数据库如何不提示报错

mysql> drop database drop_database;
ERROR 1008 (HY000): Can't drop database 'drop_database'; database doesn't exist

展开
收起
道月芬1 2021-10-14 13:40:36 599 分享 版权
1 条回答
写回答
取消 提交回答
  • mysql> drop database if exists drop_database ;
    Query OK, 0 rows affected, 1 warning (0.01 sec)
    
    2021-10-14 13:41:31
    赞同 展开评论