Saturday, July 24, 2010

Write a SQL query to display the names of all the employee whose slary is either less than 13000 or don’t have any salary from the following tables --


              Employee table                                                        Salary table
                                                 
EmployeeID
EmployeeName
1
Vinit
2
Deepak
3
Ram
4
Sudeep
5
Ajay
EmployeeID
EmployeeSalary
1
10000
2
12000
3
15000
4



                                                                                                                                                                 

Select EmployeeName, Salary  from Employee
left outer  join Salary on Employee.EmployeeID=Salary.EmployeeID
where isnull(salary,0) <13000

No comments:

Post a Comment


All Rights Reserved @ Raju Das