declare a_count number; a_max number; a_min number; a_avg number(4); begin
Select count(*),max(salary),min(salary),avg(salary) into a_count, a_max, a_min, a_avg from hr.employees; dbms_output.put_line('Today our company has ' || a_count || ' employees'); dbms_output.put_line('The average salary in the company is ' || a_avg); dbms_output.put_line('The maximum salary in the company is ' || a_max); dbms_output.put_line('The minimum salary in the company is ' || a_min); end; /
SET ServerOutput on > By default, SQL*Plus doesn’t display output from PL/SQL, execute this command can unblock this function Declares > this is the statements that declare variables, constants, and other code elements, which can then be used within that block …show more content…
Just add a sentence following this command, You can also use this command to display the value of the