SQL server where clause (compare more values in more values) -
select * customers ('paris','london', 'dublin', 'venice') in (select city europe) select city europe return more 1 value,
how can this?
i dont want repeat condition like:
where ('paris') in (select city customers) or ('london') in (select city customers) or ('dublin') in (select city customers) or ....
your second select redundant, , can "flip" in condition.
so equivalent of query is:
select * customers city in ('paris','london', 'dublin', 'venice') update.
based on logic you've disclosed in comments, query should like:
select * customers exists(select top 1 * europe city in ('paris','london', 'dublin', 'venice')) exactly stated: if exists @ least 1 of city in ('paris','london', 'dublin', 'venice') in europe customers selected, else nothing selected.
Comments
Post a Comment