下列语句没有语法错误的是()。
A: SELECT * FROM my table WHERE order=10
B: SELECT * FROM [my table] WHERE order=10
C: SELECT * FROM my table WHERE [order]=10
D: SELECT * FROM [my table] WHERE [order]=10
A: SELECT * FROM my table WHERE order=10
B: SELECT * FROM [my table] WHERE order=10
C: SELECT * FROM my table WHERE [order]=10
D: SELECT * FROM [my table] WHERE [order]=10
举一反三
- 查询主键id从高到低排序的前10条记录的语句是() A: SELECT * FROM table ORDER BY id ASC limit 1,10 B: SELECT * FROM table ORDER id DESC limit 10 C: SELECT * FROM table ORDER BY id DESC limit 10 D: SELECT * FROM table ORDER id ASC limit 1,10
- 把查询语句的各个子句按执行的先后顺序排列,正确的是( ) A: FROM→WHERE→GROUP BY→SELECT→ORDER BY B: SELECT→FROM→WHERE→GROUP BY→ORDER BY C: WHERE→FROM→SELECT→GROUP BY→ORDER BY D: FROM→WHERE→SELECT→ORDER BY→GROUP BY
- 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、WHERE、GROUP BY、HAVING、ORDER BY B: SELECT、FROM、WHERE、HAVING、GROUP BY、ORDER BY C: SELECT、FROM、WHERE、ORDER BY、HAVING、GROUP BY D: SELECT、FROM、ORDER BY、WHERE、GROUP BY、HAVING
- 下列语句错误的是 ( ) A: select * from orders where order错ame is 错ot 错ull; B: select * from orders where order错ame<>错ull; C: select * from orders where order错ame is 错ull; D: select * from orders where order错ame 错ot is 错ull;