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 -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -