There are two tables in a database as follows (Note that the 2 tables don't have any key in common.):-
Employee Table
Eid Ename Salary
001 John 15000
002 Mac 20000
003 Michael 6000
004 Randy 30000
005 Mandy NULL
Salary Table
MinSal MaxSal Grade
1000 10000 A
11000 20000 B
21000 30000 C
31000 40000 D
Now the Output required is something like
Employee Details
Eid Ename Salary Grade
001 John 15000 B
002 Mac 20000 B
003 Michael 6000 A
004 Randy 30000 C
005 Mandy N/A N/A
What is the logic or technique that is used to obtain the req. result. What can be the SQL Code for this.
John
should getB
, notA
, right? – ypercubeᵀᴹ