111
来源:互联网 发布:赵丽蓉老师知乎 编辑:程序博客网 时间:2024/06/07 04:04
[sql]
3.查询
3.1查询表的所有记录
在oracle中使用
select xuehao,name,tel from table2;
在mongodb里使用
db.table2.find()
3.2查询指定的列的所有数据
在oracle中使用
select name from table2;
在mongodb里使用
db.table2.find({},{“name”:1})
3.3查询过滤单一条件
在oracle中使用
select xuehao,name,tel from table2 where xuehao=”5”;
在mongodb里使用
db.table2.find({“xuehao”:”5”},{“xuehao”:1,”name”:1,”tel”:1})
3.4查询过滤多个组合and条件
在oracle中使用
select xuehao,name,tel from table2 where xuehao=”5” and name=”lxd3”;
在mongodb里使用
db.table2.find({“xuehao”:”5”,”name”:”lxd3”},{“xuehao”:1,”name”:1,”tel”:1})
3.5查询过滤多个组合or条件
在oracle中使用
select xuehao,name,tel from table2 where xuehao=”5” or name=”lxd%”;
在mongodb里使用
db.table2.find({$or:[{“xuehao”:”5”,”name”:”/^lxd/”}]},{“xuehao”:1,”name”:1,”tel”:1})
- 111
- 111
- 111
- 111
- 111
- 111
- 111
- 111
- 111
- 111
- 111
- 111
- 111
- 111
- 111
- 111
- 111
- 111
- SMPP协议解析
- HBase修改压缩格式及Snappy压缩实测分享
- Android Activity值传递
- java.lang.SecurityException: Unable to find app for caller android.app.ActivityThread$
- android:descendantFocusability用法简析
- 111
- mfc调色板和区域
- YUV格式详细解释与FFMPEG的关系
- java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Double 项目中类型转换
- ibatis与spring的整合
- K60_CAN
- spark 1.5.2配置记录
- 推荐系统评测指标—准确率(Precision)、召回率(Recall)、F值(F-Measure)
- jquery实现数字抽奖(版本1)