Sub Query
1)StateMaster Table
Column Name:-Id,State
2)CityMaster Table
Column Name:- Id,StateId,City
Question:- How to retrieve Column City,State from Table CityMaster,StateMaster respectively?
Answer:- select *,(select [State] from StateMaster where StateMaster.Id=StateId) as [State] from CityMaster
Column Name:-Id,State
2)CityMaster Table
Column Name:- Id,StateId,City
Question:- How to retrieve Column City,State from Table CityMaster,StateMaster respectively?
Answer:- select *,(select [State] from StateMaster where StateMaster.Id=StateId) as [State] from CityMaster
No comments:
Post a Comment