Suppose I have the database consisting of T1 (a, b, c) And I also have the database T2 (a, b, c) Can I use the IN operator to check that there is a record from T1 to T2? Like this for example:
select a from T1 where (a, b, c) in (select a, b, c from T2)
Or does the IN operator only work on a single value? Thanks for answering :)
Your query can be rewritten using exists
exists
select a from T1 t1 where exists (select 1 from T2 t2 t1.a = t2.a and t1.b = t2.b and t1.c = t2.c)
1.4m articles
1.4m replys
5 comments
57.0k users