建立資料庫

2021-06-17 23:55:33 字數 326 閱讀 9698

1.建立資料庫表 

mysql>create database if not exists my_db default charset utf8 collate utf8_general_ci; 

#注意後面這句話 "collate utf8_general_ci",大致意思是在排序時根據utf8變碼格式來排序 

#那麼在這個資料庫下建立的所有資料表的預設字符集都會是utf8了 

mysql>create table my_table (name varchar(20) not null default '')type=myisam default charset utf8;

資料庫建立

刪除資料庫 drop database cpxs 資料庫操作語法 建立資料庫 create database database name on 子句 資料檔案屬性 primary 指定主檔案,否則預設第乙個 n 檔案屬性 filegrowth growth increament n 檔案組 log ...

建立資料庫

1.建立表空間 create tablespace test space logging datafile f oracle oracledata test.ora size 5m extent management local uniform segment space management au...

建立資料庫

建立乙個資料庫 binbin 有乙個主要資料庫檔案 bin.mdf 乙個次要資料庫檔案組 jay 裡面有次要資料檔案 jay 1.ndf,jay 2.ndf 乙個日誌文志檔案 ziji.ldf 判斷是否存在此資料庫,若存在就刪除 if exists select from sysdtabases w...