Hi, I am writing an sql query in which i have to choose only that url that are from particular host but are not zip files. something like:
select * from mytable where url like '%myhost%' and url not like '%zip%'
Is there a simple way to combine these two condition into one?
Are you worried about performance?
Making the query "shorter" does not improve performance necessarily.
Otherwise I do not understand what you are trying to do.
Jim, I had an impression tying the two condition together will improve performance. If that is not necessarily the case, I will go with current syntax
Your sql is fine, otherwise, assuming it gives you the correct resultset