Sir, I have a Table name tbl_Employee
the Colums to this table is emp.Id, lastname,firstName,middleName,jobId,managerId,hireDate, salary,commission,departmentId
I want to display all details in ASC order according to lastName and Salary in DESC order.
Is this possible?. if yes, send me the code.
Loading

Pankaj PandeyPosted Jun 6, 2013, 3:46 AM
select * from tbl_Employee order by lastName asc, Salary desc
Bineesh ViswanathPosted Jun 6, 2013, 4:10 AM
Bineesh ViswanathPosted Jun 6, 2013, 3:38 AM
but the lastName ASC is not working in output.
The output is:-
employeeId lastName firstName middleName jobId managerId hireDate salary comm departmentId
---------------- -------------------- -------------------- -------------------- ---------------- ---------------- ----------------------- ---------------- ----------- ----------------
7505 DOYLE JEAN K 671 7839 4/4/1985 2850
7506 DENNIS LYNN S 671 7839 10/5/1985 2750
7507 BAKER LESLIE D 671 7839 9/6/1985 2200
7499 ALLEN KEVIN J 670 7698 12/4/1984 1600 300 30
7521 WARK CYNTHIA D 670 7698 4/2/1985 1250 500 30
7369 SMITH JOHN Q 667 7902 12/5/1984 800
please send me the corrected code
Pankaj PandeyPosted Jun 6, 2013, 3:07 AM
select * from tbl_Employee order by Salary desc,lastName asc