SYSETM_OUT 2016-12-01 10:10 采纳率: 0%
浏览 821

带(+)的sql语句如何理解

select t.id,
(select i.inst_name from t_institution i where i.inst_no(+)=t.inst_no) inst_no,
t.merchant_no,
t.mid,t.merchant_name,t.short_name,t.status,
t.address,t.contract,t.tel,
(select u.name from t_user u where u.username(+)=t.op_user) op_user,t.op_time from t_merchant t where t.inst_no=#{inst_no} and t.mid=#{mid}
像上面的这样的sql语句是oracle里面的她是正确的,但问题是我现在要使用mysql了数据库了,那么这个语句该怎么修改,关键是他的form后面只有一个表,不知用不能确定where关键字后面的等号右边的表到底是哪一个

  • 写回答

2条回答

  • 瓦史托德 2016-12-01 10:21
    关注

    select t.id,
    (select i.inst_name from t_institution i right join t on i.inst_no=t.inst_no ) inst_no,
    t.merchant_no,
    t.mid,t.merchant_name,t.short_name,t.status,
    t.address,t.contract,t.tel,
    (select u.name from t_user u right join t on u.username=t.op_user) op_user,t.op_time from t_merchant t where t.inst_no=#{inst_no} and t.mid=#{mid}

    评论

报告相同问题?

悬赏问题

  • ¥15 一道python难题2
  • ¥15 一道python难题
  • ¥15 用matlab 设计一个不动点迭代法求解非线性方程组的代码
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试
  • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题
  • ¥15 教务系统账号被盗号如何追溯设备