I have two individual queries, which I have to join them into single query.
1st query:
I have a parameter called name in a request. When I give that name, it should determine its id. Example: If I give VS-ABC in a request it should determine it's id=1.
stu_details table
[{id:1,name:"VS-ABC"]} -- sample input record to refer
select * from stu_details where name="VS-ABC"
2nd query:
select * from PR
where pr_id in (select pr_id from PRS where id =1)
Here id =1 and I am giving it manually, but I wanted these queries to run in a single shot and dynamically. Whenever I pass a request "name" parameter then it should determine that id and pass in the second query inside IN query.