建立資料庫 CREATE DATABASE 資料庫名;
語法:CREATE DATABASE mydb
使用資料庫 USE 資料庫名;
語法:USE mydb
刪除資料庫 DROP DATABASE 資料庫名;
語法:DROP DATABASE [IF EXISTS] mydb
建立資料表
CREATE TABLE 資料表名 (欄位1 資料型態, 欄位2 資料型態, ......);
語法:
CREATE TABLE [IF NOT EXISTS] tbl_name (create_definition,...) [table_options] [select_statement]
沒有留言:
張貼留言