sql - Display the details of the employees who have been hired after the employee 'Jack' was hired -


below code display details of employees have been hired after employee 'jack' hired

all of information in single table.

my query:

select e.employee_name, e.hiredate employees e  e.employee_hiredate > jack.hiredate; 

to 'jack' table, need join:

select e.employee_name, e.hiredate  employees e join employees jack on jack.employee_name = 'jack' e.employee_hiredate > jack.hiredate; 

alternatively can use subquery:

select e.employee_name, e.hiredate  employees e e.employee_hiredate > (select hiredate employees employee_name = 'jack'); 

this article may give better explanation on how joins work, , this article explain bit subqueries.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -