sqlËÙ¶ÈÂýµÄÎÊÌâ - Oracle / »ù´¡ºÍ¹ÜÀí
select a.exec_sqn, a.dept_code
from ipmonmex a, lis_test_reg b
where a.exec_sqn = b.exec_sqn
and b.barcode = '1002052716'
Ö´ÐÐËٶȵÄ2·ÖÖÓ×óÓÒ£¬ÊµÔÚÊÇÌ«ÂýÁË£¬µ«ÊÇÒ²ÊÇÓõ½ÁËË÷Òý£¬a.exec_sqnÊÇΨһË÷Òý£¬b.exec_sqnÊÇÆÕͨË÷Òý¡£
Ö´Ðмƻ®ÈçÏÂ
SELECT STATEMENT, GOAL = CHOOSE ºÄ·Ñ=1267 »ùÊý=77072 ×Ö½Ú=4084816
MERGE JOIN ºÄ·Ñ=1267 »ùÊý=77072 ×Ö½Ú=4084816
TABLE ACCESS BY GLOBAL INDEX ROWID ¶ÔÏóËùÓÐÕß=TLHIS ¶ÔÏóÃû³Æ=IPMONMEX ºÄ·Ñ=826 »ùÊý=7707246 ×Ö½Ú=107901444
INDEX FULL SCAN ¶ÔÏóËùÓÐÕß=TLHIS ¶ÔÏóÃû³Æ=PK_IPMONMEX ºÄ·Ñ=26 »ùÊý=7707246
SORT JOIN ºÄ·Ñ=441 »ùÊý=63901 ×Ö½Ú=2492139
INDEX RANGE SCAN ¶ÔÏóËùÓÐÕß=TLHIS ¶ÔÏóÃû³Æ=LIS ºÄ·Ñ=2 »ùÊý=63901 ×Ö½Ú=2492139
select a.exec_sqn, a.dept_code
from ipmonmex a, lis_test_reg b
where a.exec_sqn = b.exec_sqn
and b.barcode = '1002052716'
¾ÍÕâôһ¾äÒªÁ½·ÖÖÓ?
ÄÇ·Ö±ð¶Ôipmonmex , lis_test_reg ±íµÄexec_sqn Áн¨Á¢Ë÷Òý.
Èç¹û»¹²»ÐÐ,¶Ôlis_test_reg µÄ barcode ÁÐÔÙÁ¬½ÓË÷Òý.
2ÕűíÓжà´óÄØ£¿
Oracle SQLµÄÓÅ»¯ ¹©²Î¿¼..
http://blog.csdn.net/tianlesoftware/archive/2009/10/15/4672023.aspx
------------------------------------------------------------------------------
Blog£º http://blog.csdn.net/tianlesoftware
Í
Ïà¹ØÎÊ´ð£º
ÎÒÓжà¸ö±íA B C ½á¹¹ÊÇÒ»ÑùµÄ£¬¶¼ÓÐ2¸ö×Ö¶ÎnameºÍcontent,ÎÒÒªËÑË÷ËùÒÔ±íËùÓÐ×Ö¶ÎÖаüº¬¡°Öйú¡±µÄÄÚÈÝ Õâ¸öSQLÓï¾äÔõôд
ÈçºÎ½«¶à¸ö±íµÄ²éѯ½á¹ûÁ¬³ÉÒ»¸ö±í Õâ¸öSQLÓï¾äÔõôд ±íµÄ½á¹¹ÊÇÒ»ÑùµÄ
ÀýÈç£ ......
°²×°ÁËOracle 10g£¬Ä¬ÈÏ°²×°ÁËorclÊý¾Ý¿â£¬Õâ¸öÊý¾Ý¿âÄܲ»ÄÜɾ³ý°¡£¬»¹ÓÐÎÒÈç¹ûн¨ÁËÆäËûÊý¾Ý¿â£¬Ôõô֪µÀÔÚwebÖеǽ²»Í¬Êý¾Ý¿âµÄµØÖ·°¡£¿
1
¿ÉÒÔɾ³ý
2
ÔÚWEBµØÖ·À¸ÖÐÊäÈëµØÖ·µÄʱºòÖ¸¶¨Ð´´½¨µÄÊý¾Ý¿âµÄIP ......
sqlÎÒÏëµÃµ½Ò»×Ö·û´®Îª:
sldkf|||sdeww
erkv|||rltdk
jemcl|||ligf
¾ÍÊÇ|||ºóÃæµÄ×Ö·ûÓÐʲôº¯ÊýÄܵõ½Âð£¿ÊÇÔÚsqlÓï¾äдµÄ£¬²»ÊÇÔÚÒ³ÃæдµÄ£¬ÄÇλ¸ßÊÖÀ´Ö¸½ÌÏ£¬ÐÂÊÖ£¬Ð»Ð»
ÔνñÌì²»ÊÇдÁËô
select parsen ......
ÎÒÓÐÒ»¸ö±í£¬½á¹¹ÊÇÕâÑù¡£
ת³ö µ¥Î» תÈ뵥λ ±ÊÊý ½ð¶î
date(Ö÷) outid(Ö÷) inid(Ö÷) num amt
2009 1 2 1 500 Ϊ 1 µ¥Î» ÔÚ2009Ä ......
--drop table #T1
--drop table #T2
create Table #T1(ID int,
QueryID nvarchar(20),
ResultID1 nvarchar(20),
ResultID2 nvarchar(20))
create Table #T2(SortNo int,
QueryID nvarchar(20),
ResultID1 nv ......