下列多条件查询使用正确的有()
A:
B: and查询db.collection.find({ $and : [ { "age" : {$gt : 10 }} , { "gender" : "man" } ]})
C: #or查询db.collection.find({ $or : [ {"age" : {$gt : 10 }}, { "gender" : "man"} ]})
D:
E: and查询和or查询db.inventory.find( { $and : [ { $or : [ { price : 0.99 }, { price : 1.99 } ] }, { $or : [ { sale : true }, { qty : { $lt : 20 } } ] } ]} )
F:
G: and查询和or查询db.inventory.find( { $or: [ { $and : [ { price : 0.99 }, { price : 1.99 } ] }, { $: [ { sale : true }, { qty : { $lt : 20 } } ] } ]} )
A:
B: and查询db.collection.find({ $and : [ { "age" : {$gt : 10 }} , { "gender" : "man" } ]})
C: #or查询db.collection.find({ $or : [ {"age" : {$gt : 10 }}, { "gender" : "man"} ]})
D:
E: and查询和or查询db.inventory.find( { $and : [ { $or : [ { price : 0.99 }, { price : 1.99 } ] }, { $or : [ { sale : true }, { qty : { $lt : 20 } } ] } ]} )
F:
G: and查询和or查询db.inventory.find( { $or: [ { $and : [ { price : 0.99 }, { price : 1.99 } ] }, { $: [ { sale : true }, { qty : { $lt : 20 } } ] } ]} )
举一反三
- find只能指定一个查询条件( )
- 在linux的查询命令有那些()。 A: man B: find C: whereis D: locate
- 查询book表中price字段的最大值,查询语句是: A: select max(price) from book; B: select min(price) from book; C: select price from min book; D: select price from max book;
- 查询比计算机类图书便宜的书,语句中 SELECT name ,price from book where price____ (select price from book where category='计算机')缺省的部分应是()。 A: > all B: > any C: < any D: < all
- 有如下SQL语句: SELECT DISTINCT productName, price FROM product WHERE (price>;(SELECT AVG(price) FROM product)) ORDER BY price DESC; 下面说法错误的是( )。 A: "SELECT AVG(price) FROM product "是子查询 B: "ORDER BY price DESC"是指按price从低到高顺序排列 C: 查询结果显示的是大于平均价格的产品记录 D: 此查询显示的字段只有"productName"和"price"