Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
stephen6388
Starting Member
1 Post |
Posted - 2015-03-06 : 10:23:11
|
set serveroutput on; declare vmaxsalary number(6); vlastname varchar2(50);vfirstname varchar2(50);var_empID number (6); mvminsalary number(6); mvlastname varchar2(50);mvfirstname varchar2(50);mvar_empID number (6);begin select max(salary), employee_ID, last_name, first_name into vmaxsalary, var_empID, vlastname, vfirstname from employees order by max; dbms_output.put_line('Employee ID ' || var_empID || ' Name ' || vfirstname || ' ' || vlastname || ' has the highest salary ' || vmaxsalary); select min(salary), employee_ID, last_name, first_name into mvminsalary, mvar_empID, mvlastname, mvfirstname from employees order by min; dbms_output.put_line('Employee ID ' || mvar_empID || ' Name ' || mvfirstname || ' ' || mvlastname || ' has the lowest salary ' || mvminsalary); end; / |
|
James K
Master Smack Fu Yak Hacker
3873 Posts |
Posted - 2015-03-06 : 12:09:43
|
This is a Microsoft SQL Server forum; so there may be few, if any, who can answer Oracle questions. |
|
|
|
|
|
|
|