How much "weight" should an SQL query have?
Consider the following SQL query:
select * from person where city = (select cityName from City where population < 10000 and rownum = 1) and address = (select addressName from Addresses where ......)
In comparison to retrieving cityName to a variable, retrieving addressName to a variable and then replacing the above statement with variables instead of nested queries. Do you think the example should be split into 3 queries and use code to do the logic leaving sql just for general retrieving?
Posted Jan 2, 2018, 8:40 PM UTC
112