Sir,
I would 3 tables in my sql database.
1. emp_master
2. emp_policy_details
3. policy_master
PK - Primary Key, FK - Forigen Key
- In table 1 i have saved only employee details with emp_id as PK.
- In table 2 i have saved all the policies of employee with policy_number as PK, emp_id as FK, type_of_policy_id as FK.
- In 3 table i have types of policies with type_of_policy_id as PK.
Now I want to get:
emp_name,father_name,date_of_birth,date_of_join - [from table 1]
date_of_issue - [from table 2]
policy_amount - [from table 3]
Should fetch all columns in single query
I would have to send only a @Policy_number to Stored Procedure. So based on this I would need result.
How should I get this ?