两个SQL语句

mac2022-06-30  71

在查询分析器里,查看Query 的 Display Estimated Exceution Plan Ctrl+L ,Show exection Plan Ctrl+K,

set SHOWPLAN_TEXT ongoselect * from stock_detail inner join barcode_master on stock_detail.barcode=barcode_master.barcodewhere style1 in(1,3)

select * from stock_detail inner join barcode_master on stock_detail.barcode=barcode_master.barcodewhere exists (select style_code from style1 where style_code in(1,3) and barcode_master.style1=style1.style_code )goset FORCEPLAN on select * from stock_detail inner join barcode_master on stock_detail.barcode=barcode_master.barcodewhere style1 in(1,3)

select * from stock_detail inner join barcode_master on stock_detail.barcode=barcode_master.barcodewhere exists (select style_code from style1 where style_code in(1,3) and barcode_master.style1=style1.style_code )set FORCEPLAN off

转载于:https://www.cnblogs.com/antony1029/archive/2006/11/21/567021.html

最新回复(0)