test
来源:互联网 发布:telnet不通公网80端口 编辑:程序博客网 时间:2024/05/17 21:52
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})
0 0
- test
- test
- test
- test
- test
- test
- test
- Test
- test
- Test
- test
- test
- test
- test
- test
- test
- test
- Test
- linux下的程序调试工具gdb
- 折线图(七)自定义属性
- 字符串批量替换工具,R资源id动态获取
- php 读取文件自身内容,与读取文件输出内容
- activity的生命周期
- test
- 数据库有数据,但查询不到数据,没查到还爆空指针
- POJ 1928 The Peanuts
- .NET框架
- Linux 中断之下半部机制
- Ubuntu find 命令
- Java内功提升之封装
- poj 1236 Network of Schools(强连通分量 Tarjan算法)
- IOS控件学习:UILabel常用属性与用法