1111
来源:互联网 发布:linux命令设置用户权限 编辑:程序博客网 时间:2024/04/29 06:00
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})
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
- 1111
- 1111
- 1111
- 1111
- 1111
- 1111
- 1111
- 1111
- 1111
- 1111
- 1111
- 1111
- 1111
- 1111
- 1111
- 1111
- 1111
- 1111
- android studio对.9格式图片的支持
- Volley框架--网络请求(GET和POST请求的使用)
- 项目体验:高并发httpclient和线程池的正确使用
- Yum安装Apache(2.2)、MySQL(5.5)、PHP(5.4)
- Linux命令记载
- 1111
- android.intent.action.MAIN和singleTask模式一起使用导致每次进入应用都会进入该Activity
- swift页面跳转的集中方式归纳
- new 和delete的讲解
- 浅谈组态软件的控制功能
- python学习笔记
- startActivity和startActivityForResult
- boundingRectWithSize 的使用
- linux下安装nginx常见错误