已知数据库的排序规则是默认设置。在northwind数据库中有一个表[orderdetails],表示所有定单的详情,该表中有一列quantity,表示定单中某产品的数量。你想实现按照产品数量从小到大排序来查询定单,使用orderby子句为()
A: Select*from[orderdetails]Orderbyquantitydesc
B: Select*from[orderdetails]Orderbyquantityasc
C: Select*from[orderdetails]Orderbyquantity
D: Select*from[orderdetails]Orderbydescquantity
A: Select*from[orderdetails]Orderbyquantitydesc
B: Select*from[orderdetails]Orderbyquantityasc
C: Select*from[orderdetails]Orderbyquantity
D: Select*from[orderdetails]Orderbydescquantity
举一反三
- 中国大学MOOC: 设计一个select语句,查询定单日期(order_date)处于1998年7月份之前的定单的所有数据SQL代码为:Select * from orders where _ _。
- 学生数据库中有学生表,该表中有学生职务列。若想检查哪些学生没有填写学生职务一栏,应该使用子句:( ) A: Select * from 学生表 where 学生职务= NULL B: Select * from 学生表 where 学生职务= ‘NULL’ C: Select * from 学生表 where 学生职务 is NULL D: Select * from 学生表 where 学生职务 is ‘NULL’
- 查询goods表中有几种类型的商品 A: select * from goods; B: select type from goods; C: select type distinct from goods; D: select distinct type from goods;
- 用SQL语句实现查询表名为“图书“的表中所有记录,应该使用的SELECT语句是()。 A: select * from 图书 B: select distinct * from 图书 C: select * from 图书表
- 在查询数据库中的某个表时,Statement对象要调用( )方法 A: executeUpdate("select * from table1") ; B: executInsert("select * from table1") ; C: executeDelete("select * from table1") ; D: executeQuery("select * from table1") ;