Posted - 12/04/2013 : 16:25:56
| I have a table that contains empid, name, salary, hiredate, positionand supervisor (which includes empid not the name) how do i list the empid and name of all supervisors ? the output has to have to columns supervisor( and a list of their emid) and their names. Thats the create statement used to create the employee table:
/* Create table Employee */
IF OBJECT_ID('Employee', 'U') IS NOT NULL
DROP TABLE Employee
CREATE TABLE Employee (
i have tried a variety of statements using having statement and count but the dont seem to work:/
select emp_id, name from employee where position='manager'; i tried this but it doesnt work anoune smart that knows how to do it?