比如说我表1中是一些号码,我表2和表3是号码的话费信息,表1,表2,表3都是有号码字段的,表2,3多了一个字段的话费信息。
如何查询表1中的号码在表2中有话费信息(在表2中没有话费信息的号码在表3在有话费信息也行)
表1
表2,表3和表2一样
能不能帮我看下我这语句该怎么写
追答select t1.* from 表1 t1 where exit(select 1 from 表2 t2 where t1.callerno=t2.callerno) or exit(select 1 from 表3 t3 where t1.callerno=t3.callerno)