數(shù)據(jù)庫(kù)相關(guān)SQL
-
創(chuàng)建數(shù)據(jù)庫(kù)
create database db1; //指定字符集的創(chuàng)建 create database db2 character set gbk; 通常一個(gè)項(xiàng)目只對(duì)應(yīng)1個(gè)數(shù)據(jù)庫(kù)
-
刪除數(shù)據(jù)庫(kù)
drop database db2;
-
查看數(shù)據(jù)庫(kù)
show databases;//查看所有數(shù)據(jù)庫(kù) show create database db2 //查看數(shù)據(jù)庫(kù)詳情
-
使用數(shù)據(jù)庫(kù)
use db2;