我写了一个查询语句,里面条件用OR 结果查询速度特别慢,现在在条件里又加了一个嵌套,可是问题出来了,前后都有and连接,不知道怎么写了,请大家帮忙改改!
and nvl(dr, 0) = 0) tz2
where tz.freevalueid = a.assid
and tz1.freevalueid = a.assid
and tz2.freevalueid = a.assid
and b.pk_accsubj = a.pk_accsubj
从这里开始 and b.subjcode=(select subjcode from bd_accsubj b where b.subjcode like '1131%' or b.subjcode like '2121%' or b.subjcode like '1151%')到这里结束,前后有and应该怎么改 and curr.pk_currtype=a.pk_currtype
group by tz1.valuecode,
谢谢各位了啊
and nvl(dr, 0) = 0) tz2
where tz.freevalueid = a.assid
and tz1.freevalueid = a.assid
and tz2.freevalueid = a.assid
and b.pk_accsubj = a.pk_accsubj
从这里开始 and b.subjcode=(select subjcode from bd_accsubj b where b.subjcode like '1131%' or b.subjcode like '2121%' or b.subjcode like '1151%')到这里结束,前后有and应该怎么改 and curr.pk_currtype=a.pk_currtype
group by tz1.valuecode,
谢谢各位了啊
and b.subjcode like '1131%' or b.subjcode like '2121%' or b.subjcode like '1151%')
例子where colum='是''我们''吗' 实际上时判断 colum是不是等于 是‘我们’吗?
总之在引号里的引号两个算一个
求解答