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
Post a Comment