能够在建立表时用( )来建立惟一索引,也能够用( )来建立惟一索引。
A. Create table,Create index
B. 设置主键约束,设置惟一约束
C. 设置主键约束,Create index
D. 以上均可以
查看答案
关系数据库中,主键是()。
A. 建立惟一的索引,容许空值
B. 只容许以表中第一字段创建
C. 容许有多个主键的
D. 为标识表中惟一的实体
表test(a int,b int,time date)涉及如下3条sql:select * from test where a=1 and b=1;select * from test where b=1;select * from test where b=1 order by time desc;只建一个索引,如何建最优( )。
A. idx_ab(a,b)
B. idx_ba(b,a)
C. idx_abtime(a,b,time)
D. idx_btime(b,time)
主键分为2种,分别是()。
A. 单视图主键和多视图主键
B. 单视图主键和多字段主键
C. 单字段主键和单索引主键
D. 单字段主键和多字段主键
"表test(a int,b int,time date)涉及如下3条sql:select * from test where a=1 and b=1;select * from test where b=1;select * from test where b=1 order by time desc;只建一个索引,如何建最优( )。"
A. idx_ab(a,b)
B. idx_ab(a,b)
C. idx_abtime(a,b,time)
D. idx_btime(b,time)