|
-
SQL Query
I'm trying to query a database with the following table (employees)
ID_No | Name |Hire_Date | Position |Salary |Mgr_ID_No |Dept_No
E001 |GAFFER |1997-01-01 | CHAIRMAN | 150000 |NULL | 1
E019 |WILLAIMS |1992-02-02 | MANAGER | 88999.99| E001 | 1
E017 |STERLING |2001-04-17 | ADMIN | 18000 ||E109 | 1
E108 |ALLEN |2000-04-18 | ACCOUNTANT | 38000 |E109 | 1
E102 |SANDLER |2000-09-01 | MANAGER | 55000 |E001 | 2
E110 |CARTER |2003-10-01 | DESIGNER | 35000 |E102 | 2
I'm trying to find out all of the employees who have Williams as their manager.
I'm not sure how to write the query for this.
I was thinking along the lines of
SELECT * FROM Employees where Mgr_Id_No = ID_Number AND Name = 'Williams';
I know this brings up nothing but I really don't know how to query it.
Thanks in Advance
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|