输出公司的名称及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 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;
举一反三
- 查询主键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
- 下面关于修改视图的SQL语句,那个是正确的( )。 A: alter view VIEW01 as select * from users order by age desc B: alter view VIEW02 as select name,avg(score) as avgScore from studentScore C: alter view VIEW03 as select top 10 id,name,password from admin order by id D: alter view VIEW04 as select * from stuent,class where student.classid=class.classid order by class.classid
- 查询student表中id字段值小于5,并且gender字段值为“女”的学生姓名的SQL语句是() A: SELECT name FROM student WHERE id<;5 OR gender='女'; B: SELECT name FROM student WHERE id<;5 AND gender='女'; C: SELECT name FROM student WHERE id<;5 ,gender='女'; D: SELECT name FROM student WHERE id<;5 AND WHERE gender='女';
- 有表song(id,song_name,album,play_count,fav_count)分别表示歌曲的主键id、歌曲名、专辑名、播放次数和收藏次数,以下与order by相关的sql错误的是: A: select * from song order by play_count asc; B: select * from song order by (play_count + fav_count) asc; C: select * from song order by fav_count desc where play_count > 5; D: select * from song order by id,play_count asc,fav_count desc;
- 【单选题】查询student表中id字段值小于5,并且gender字段值为“女”的学生姓名的SQL语句是 A. SELECT name FROM student WHERE id<5 OR gender‘女’; B. SELECT name FROM student WHERE id<5 AND gender=‘女’; C. SELECT name FROM student WHERE id<5 ,gender=‘女’; D. SELECT name FROM student WHERE id<5 AND WHERE gender=‘女’;