sql

select * from qy_info t
where to_char(t.gkrq,'yyyy-mm-dd') between '2010-09-01'
and '2010-09-01'
and t.qy_sstax
in (120000,120101,120102,120103,120104,120105,120106,120107,
120108,120109,120110,120111,120112,120113,120114,120115,120116,
120117,120118,120221,120222,120223,120224,120225)

select * from qy_info where to_char(GKRQ, 'yyyy-mm') > '2010-06' and qy_code not in (select sh from xazd where to_char(AZRQ,'yyyy-mm') > '2010-06')


select * from
(select t.qy_code,t.gkrq from qy_info t
where to_char(t.gkrq,'yyyy-mm')>='2010-06')a,
(select t.sh,t.azrq from xazd t
where to_char(t.azrq,'yyyy-mm')>='2010-06')b
where a.qy_code=b.sh(+)
and to_char(a.gkrq,'yyyy-mm-dd')>to_char(b.azrq,'yyyy-mm-dd')
--and b.azrq is null
order by 2


select * from
(select t.qy_code,t.gkrq from qy_info t
where to_char(t.gkrq,'yyyy-mm')>='2010-06')a,
(select t.sh,t.azrq from xazd t
where to_char(t.azrq,'yyyy-mm')>='2010-06')b
where a.qy_code=b.sh(+) and b.azrq is null
order by 2


select * from
(select t.qy_code,t.gkrq from qy_info t
where to_char(t.gkrq,'yyyy-mm')>='2010-06')a,
(select t.sh,t.azrq from xazd t
where to_char(t.azrq,'yyyy-mm')>='2010-06')b
where a.qy_code=b.sh(+)
order by 2


select t.*,k.* from nbks_sjjl t,nbks_tiku k,nbks_exam e,nbks_record r
where t.sjjl_time='2010-08-10 08:39:33'
and t.tiku_id=k.tiku_id
and t.record_id=r.record_id
and r.exam_id=e.exam_id

 

   (select count(*) as s from nbks_sjjl t,nbks_tiku k where t.record_id=1406 and
   t.sjjl_time='2010-08-10 09:27:26' and k.sm=1
   and t.tiku_id=k.tiku_id
   and t.isa=k.va and t.isb=k.vb and t.isc=k.vc and t.isd=k.vd
   and t.ise=k.ve and t.isf=k.vf and t.isg=k.vg and t.ish=k.vh)
   union(select count(*) as m from nbks_sjjl t,nbks_tiku k where t.record_id=1406 and
  t.sjjl_time='2010-08-10 09:27:26' and k.sm=2
  and t.tiku_id=k.tiku_id
  and t.isa=k.va and t.isb=k.vb and t.isc=k.vc and t.isd=k.vd
  and t.ise=k.ve and t.isf=k.vf and t.isg=k.vg and t.ish=k.vh)
  
   

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值