sql - How to do WHERE clause BEFORE INNER JOIN -


how query ?

select distinct  station  , slot , subslot, compid , compname  devicetrace dt dt.deviceid = '1339759958'  inner join complist cl    , dt.compid = cl.compid 

i need dt.deviceid = '1339759958' before start inner join. work sql server.

i find difficult believe makes difference. query optimiser should apply predicate before join if calculates more efficient so. circumstance might need when optimiser makes erroneous choice (for inner joins @ least -- there valid cases outer joins).


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -