Checking Database Names and Create Database at run time

后端 未结 1 1184
盖世英雄少女心
盖世英雄少女心 2021-01-27 20:32

I have one JTextfield for getting the database name to be created and JButton for performing database creation action in my swing form. The problem is

相关标签:
1条回答
  • 2021-01-27 21:17

    Before create database just use:

    DROP DATABASE IF EXISTS db_name;
    

    and don't bother checking whether it exists or not. Check MySQL DROP DATABASE Syntax.

    0 讨论(0)
提交回复
热议问题