Sql 各种查询
来源:互联网 发布:如何注册淘宝达人 编辑:程序博客网 时间:2024/06/03 18:04
select t.cust_name,t.phone_no from app_cust_info t //通张表查其中的字段select aa.cust_name,aa.phone_no,bb.loan_no from app_cust_info aaleft join app_loan_acct bb on aa.cust_no = bb.cust_noselect t.phone_no from app_cust_info t select t.cust_no from app_cust_info twhere phone_no='18607355063'//通张表通过电话查询对应的select * from app_cust_info //查询所有select ala.loan_no from app_cust_info alcleft join app_loan_acct ala on alc.cust_no=ala.cust_nowhere phone_no='18636937160'//关联查询
select * from pub_branch_group_settle t select t.group_no from pub_branch_group_settle t where commission_type = '80000007' <!-- 创建一张表--> create table table_test1(id varchar2(40) primary key, goods_one varchar2(40), goods_two varchar2(40), goods_three varchar2(40) ) <!--插入一张表--> insert into table_test1 select sys_guid(), '001', '00101', 'a' from dual union all select sys_guid(), '001', '00101', 'b' from dual union all select sys_guid(), '001', '00202', 'aa' from dual union all select sys_guid(), '001', '00202', 'bb' from dual <!--查询--> select * from table_test1 <!--关联查询 根据一级找二级--> select goods_one, goods_two from table_test1 where goods_one = '001' group by goods_one, goods_two<!--关联查询 根据二级找三级-->select goods_one, goods_two, goods_three from table_test1 where goods_one = '001' and goods_two = '00202'
阅读全文
1 0
- sql 各种查询
- SQL各种连接查询
- sql各种查询技巧
- sql各种查询技巧
- sql各种查询技巧
- sql各种查询技巧
- 各种条件查询sql
- sql各种查询技巧
- Sql 各种查询
- 各种数据库分页查询SQL
- SQL各种连接查询详解
- sql的各种连接查询
- 各种数据库分页查询SQL
- SQL各种连接查询详解
- SQL各种连接查询详解
- sql的各种查询技巧
- SQL各种连接查询详解
- 各种SQL查询技巧汇总
- 全国shp矢量数据分享(精确到区县)
- 知识点总结
- MySQL 密码忘记
- JQuery样式
- redis必杀命令:脚本
- Sql 各种查询
- centos 7 下安装tomcat 8.5.11及mysql5.7.16
- 跟上 Java 8 : 你忽略了的新特性
- 自定义的表单提交后 提示感谢您的参与( 停留时间)
- Shiro Ajax请求没有权限返回JSON,没有登录返回JSON
- Unity调用系统窗口选择文件或文件路径 来赋值图片给物体
- 文章编辑实现分页功能
- Crashlytics(最强大,最轻的重量崩溃报告解决工具)
- phpexcel_demo