热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

sql语句关联关系的+号

看到了有个sql语句居然后面带号,第一次看到就查了下selectt1.seq,t1.IDimid,t1.workdate,t1.plancode,t1.linest

看到了有个sql语句 居然后面带+号,第一次看到就查了下

select

       t1.seq,

       t1.ID imid,

       t1.workdate,

       t1.plancode,

       t1.linestr,

       t1.workstastr,

       t1.WORKSTACODE,

       t1.workitem,

       t1.impact,

       t1.pgorgtype,

       s.orgnum,

       t2.PLAN_START_TIME AS PLANSTARTTIME,

       t3.id sdid,

       t3.SD_ML,

       t3.in_fhpersons SNPERSONID,

       t3.FLOW_STATE,

       t4.FLOW_STATE JXFLOW_STATE,

       p.pgorgid,

       t4.id jxsid

  from wxu_t_tc_import t1,

       wxu_t_tc_wc     t2,

       wxu_t_sdsq      t3,

       SYS_T_ORG       s,

       wxu_t_jxssq     t4,

       wxu_nn_t_pg     p

 where 1 = 1

   and t1.isdiscard = '0'

   and t1.id = t2.wxid(+)

   and t1.id = t3.TCID(+)

   and t1.id = t4.TCID(+)

   and (t1.zrgqid = s.id or (t1.zrgqid is null and t1.phzrgqid = s.id))

   and t1.id = p.tcid(+)

   and s.orgnum like '010202%'

   and t1.workdate >= '2016-11-18'

   and t1.workdate <&#61; &#39;2016-11-18&#39;

   and (t1.plantype!&#61;2 or t1.plantype is null)

 order by t1.seq, t1.workdate



&#xff08;&#43;&#xff09;&#xff1a;含义&#xff1a;这个关联关系&#xff0c;可有&#xff0c;可无&#xff1b;不影响主表数据的查询。

推荐阅读
author-avatar
mobiledu2502906891
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有