0

i am trying to pass id to Sp then it will first get id's against it and then get data against those id using SP or by using UDF as i trying it by

select RequestFrom from UserReqest where RequestTo=10 and IsApprove=0

select * from user where user_ID= (i have to use all five id's here ?)

Hopes for your suggestions

Thanks in Advance

1 Answer 1

3

There is an IN operator in SQL that does what you want:

select * 
from user 
where user_ID in (select RequestFrom 
                    from UserReqest 
                    where RequestTo=10 
                      and IsApprove=0)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.