select tbl1.*
from tbl_rjyls_today tbl1
where not exists (select key from tbl_yscc tbl2
where tbl1.key=tbl2.key
and tbl2.jyrq = '20060517')功能:取出存在表tbl1中而不存在于tbl2中的记录,tbl1中6W多条,tbl2中60w条
from tbl_rjyls_today tbl1
where not exists (select key from tbl_yscc tbl2
where tbl1.key=tbl2.key
and tbl2.jyrq = '20060517')功能:取出存在表tbl1中而不存在于tbl2中的记录,tbl1中6W多条,tbl2中60w条
from tbl_rjyls_today tbl0
minus
select tbl1.*
from tbl_rjyls_today tbl1,tbl_yscc tbl2
where tbl1.key=tbl2.key and tbl2.jyrq = '20060517'
from tbl_rjyls_today tbl1
where tbl1.key=tbl2.key(+)
and tbl1.jyrq = '20060517' and
tbl2.key is null