Click here to Skip to main content
15,912,756 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
SQL
Select Empid,desgnation,Ename from Employee

When run this query i get all details naturally ,but in SalaryRange Table i have 2 columns salry ,Eid.....
When i excute the query "
SQL
Select Empid,desgnation,Ename from Employee
" can i show the salary column values in desgnation column...

i dont know it is possible or not ,if it possible can any one help me
Thanks in advance
Posted
Updated 22-Dec-15 21:22pm
v2

1 solution

If you want to get Salary details instead of designation field then you need to join your SalaryRange Table with Employee table and map the exact matches which you mapped in table relationship.

Ex:

SQL
select E.EmpId, E.Ename, S.Salary
from  Employee E,
      SalaryRange S
Where E.EmpId=S.EmpId
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900