第
章mysql
表結構管理
一、選擇題
i•下列關於資料型別的選擇方法描述錯誤的是(
a.選擇最小的可用型別,如果值永遠不超過
,則使用
tinyint
比int強b.
對於完全都是數字的,可以選擇整數型別。
c.浮點型別用於可能具有小數部分的數。
d.以上都不對
unique
唯一索引的作用是(
a.保證各行
在該索引上的值不能為
null
c.保證唯一索引不能被刪除
b.保證各行在該索引上的值都不能重複
d保證參加唯一索引的各列,
不能再參加其他的索引
c.create table
d.alert database
•建立資料表時,使用
)關鍵字表示建立臨時
表。要修改資料表
tb_student
的儲存引擎為
innodb
,可以使用下面的(
)語句a.
alter table tb_student default charset=lnnodb;
b.alter table tb_student auto_increment=lnnodb;
c.alter table tb_student engine=innodb;
d.alter table tb_student add constraint mrprimary primary key
id•下列(
)不是mysql
常用的資料型別。
aint
bvarchar
cchar d
money
•下面(
)語句不能用於建立索引
acreate table
calert table
•建立資料表時,使用(
)語句。
aalter table
bcreate database
atemporary b
if not exists
c. not null
ddefault
bcreate database
dcreate index
mysql變數包括什麼意思 什麼是mysql變數?
什麼是mysql的變數?mysql變數分為幾種?在mysql資料庫中佔據了怎樣的地位?今天將為你講解mysql的變數。mysql變數是mysql資料庫中的基礎知識,下面就為您詳細介紹mysql變數,如果您對此方面感興趣的話,不妨一看,相信對您有所幫助。mysql變數介紹 mysql伺服器的系統變數,...
MySQL筆記建立表結構 MySQL表結構筆記9
本篇大綱 mysql資料表 建立表建立主鍵 auto increate 指定預設值 更新表結構 刪除表,重新命名表 01 表 mysql 資料庫的表是乙個二維表,由乙個或多個資料列構成 每個資料列都有它的特定型別,該型別決定了mysql如何看待該列資料 02 建立表 命令 格式 使用create t...
修改mysql的表結構
修改字段屬性 alter table tablename modify id int 10 unsigned auto increment primary key not null 修改預設值 alter table tablename alter id default 0 給字段增加primary...