查询主键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: 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
举一反三
- MySQL数据库中查询前10条记录的SQL语句是()。 A: select top 10 from table B: select * from table limit 10 C: select * from table limit 1, 10 D: select * from table limit 0, 10
- SQL数据库中查询前3条记录的SQL语句是()。 A: select top 3 from table B: select * from table limit 3 C: select * from table limit 1,3 D: select * from table order 3
- 输出公司的名称及id,以id的升序排列 A: SELECT name, id FROM job ORDER BY id ASC; B: SELECT name, id FROM job ORDER BY id DESC; C: SELECT name, id FROM job ORDER BY name DECS; D: SELECT name, id FROM job ORDER BY name ASC;
- 下面查询语法错误的是( ) A: select * from table limit 10; B: select * form table limits 10,5; C: select * form table limit 10 offset 4; D: select * from table limit 10,5;
- 下列语句没有语法错误的是()。 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