Hi thanks in advance
I was strucked here in c#
I have tables (A & B)
some customers EMPID column in table A and some are in Table B
Now I want to write select statement: if EMPID not exists in A then choose from B.
Please guide me
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Pankaj Kumar ChoudharyRank #80 · 24.4K reputationPosted Aug 8, 2017, 6:37 AM EDT
if exists(select 1 from tableA where EMPID = 4)BEGINselect * from tableA where EMPID = 4ENDELSEselect * from tableB where EMPID = 4END