SQL 資料庫關鍵字
CREATE DATABASE
The CREATE DATABASE
command is used is to create a new SQL database.
The following SQL creates a database called "testDB"
示例
CREATE DATABASE testDB;
Tip: Make sure you have admin privilege before creating any database. Once a database is created, you can check it in the list of databases with the following SQL command: SHOW DATABASES;
DROP DATABASE
The DROP DATABASE
command is used is to delete an existing SQL database。
The following SQL drops a database named "testDB" (以下 SQL 語句刪除名為 "testDB" 的資料庫)
示例
DROP DATABASE testDB;
Note: Be careful before dropping a database. Deleting a database will result in loss of complete information stored in the database! (注意:刪除資料庫前請務必小心。刪除資料庫將導致其中儲存的所有資訊丟失!)