数据表temp(a int.b int.t date)涉及3条 SQL 如下。SELECT* FROM temp WHERE a=1 AND b=l ;SELECT * FROM temp WHERE b=1 ;SELECT* FROM temp WHERE b=1 ORDER BY t DESC ;现为该表只创建一个索引,如何创建性能最优()。
A: idx_ab(a,b)
B: idx_ba(b,a)
C: idx_bt(b,t)
D: idx_abt (a,b,t)
A: idx_ab(a,b)
B: idx_ba(b,a)
C: idx_bt(b,t)
D: idx_abt (a,b,t)
举一反三
- 下列的查询语句哪一项是错误的(选一项) A: Select * from stumarks where score>=60 B: Select * from (select * from stumarks where score>=60) C: Select * from (select * from stumarks where score>=60) as temp D: Select * from (select * from stumarks ) as temp where score>=60
- create table t(id int not null, a int default 0, b int default 0, c int default 0, primary key(id), key idx_a_b(a, b));下面语句能够利用到索引的是() A: select b from t where a=10; B: select * from t where a=10 and id=100; C: select * from t where a=10 and b>100; D: select * from t where a>10 and b < 100; E: select * from t order by b limit 10;
- 请选择下面正确的SQL语句( ) A: select * from 表名 order by 列名1 and order by 列名2 B: select * from 表名 order by 列名1,列名2 C: select * from 表名 where 列1=值1 and 列2=值2 D: select * from 表名 where 列1=值1 and 列1=值2
- 写出条件查询“表1 里的字段1的id是多少”() A: select * from 表1 where字段1=“值” B: select id from 表1 where字段1=“值” C: select id from 字段1 where表1=“值” D: select id from 表1
- DBMS对数据库数据的检索、插入、修改和删除操作的功能称为( )。 A: SELECT * FROM学生表WHERE"1"$学号 B: SELECT * FROM学生表WHERE RIGHT(学号,1)="1" C: SELECT * FROM学生表WHERE SUBSTR(学号,2)="1" D: SELECT * FROM学生表WHERE SUBSTR(学号,2,1)="1"