![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
sql语句
kelsey1234
多多批评指摘,谢谢
展开
-
Mysql和Oracle组内排序的区别
Mysql和Oracle组内排序的区别 一、Oracle组内排序Eg: 创建表: drop table t_emp_wpzhang; create table t_emp_wpzhang( id int(11) primary key, name varchar(50), age int(3), dept varchar(20), salary decimal(10 , 2) ); 准备数据 insert all into t_emp_wpzhang(id,name,age,dept,原创 2020-12-23 17:23:10 · 348 阅读 · 0 评论 -
查询当前节点及其子节点在sql和代码中的实现
查询当前节点及其子节点在sql和代码中的实现 一、oracle中实现: start with 子节点ID=’…’ connect by prior 子节点ID=父节点ID 形式查询当前节点及其子节点的信息,Eg: SELECT t.org_id , t.org_code,t.super_id FROM T_UAOP_ORGANIZATION t where type=2 START WITH ORG_CODE = '350200000000' CONNECT BY PRIOR ORG_ID = SU原创 2020-12-23 17:18:46 · 1410 阅读 · 0 评论 -
sql语句左连接时的ON AND用法
记一次sql语句左连接时的ON AND用法 stu表 stu_tea表 sql语句:查询出左连接后的所有数据 SELECT s.*, st.* FROM stu s LEFT JOIN stu_tea st ON s.id = st.sid ; 查询结果 sql语句:on and查询语句 SELECT !ISNULL(st.tid) as ifBoundFlag, s.*, st.* FROM stu s LEFT JOIN stu_tea st ON s.id = st.sid A原创 2020-07-21 18:06:04 · 2823 阅读 · 0 评论