View the Exhibit to examine the PL/SQL code.
DECLARE
type t_rec is record
(v_sal number(8),
v_minsal number(8) default 1000,
v_hire_date employees.hire_date%type,
v_recl employees%rowtype);
v_myrec t_rec
BEGIN
v_myrec.v_sal := v_myrec.v_minsal + 500;
v_myrec.v_hire_date := sysdate;
SELECT * INTO v_myrec.v_rec1
FROM employees WHERE employee_id = 100;
DBMS_OUTPUT.PUT_LINE(v_myrec.v_rec1.last_name || ' ' ||
to_char(v_myrec.v_hire_date) || ' ' || to_char(v_myrec.v_sal));
END;
The record for the employee with employee_id 100 in the employees table is as follows:
SQL > SELECT employee_id,first_name,last_nem,
email,hire_date,job_id,salary
FROM employees
WHERE employee_id = 100;
EMPLOYEE_ID FIRST_NAME LAST_NAME EMAIL HIRE_DATE JOB_ID SALARY
-------------- -------------- ------------- ------- ----------- --------- -----------
100 Steven King SKING 17-JUN-87 AD_PRES 24000
Identify the correct output for the code.
View the Exhibit to examine the PL/SQL code.
DECLARE
type t_rec is record
(v_sal number(8),
v_minsal number(8) default 1000,
v_hire_date employees.hire_date%type,
v_recl employees%rowtype);
v_myrec t_rec
BEGIN
v_myrec.v_sal := v_myrec.v_minsal + 500;
v_myrec.v_hire_date := sysdate;
SELECT * INTO v_myrec.v_rec1
FROM employees WHERE employee_id = 100;
DBMS_OUTPUT.PUT_LINE(v_myrec.v_rec1.last_name || ' ' ||
to_char(v_myrec.v_hire_date) || ' ' || to_char(v_myrec.v_sal));
END;
The record for the employee with employee_id 100 in the employees table is as follows:
SQL > SELECT employee_id,first_name,last_nem,
email,hire_date,job_id,salary
FROM employees
WHERE employee_id = 100;
EMPLOYEE_ID FIRST_NAME LAST_NAME EMAIL HIRE_DATE JOB_ID SALARY
-------------- -------------- ------------- ------- ----------- --------- -----------
100 Steven King SKING 17-JUN-87 AD_PRES 24000
Identify the correct output for the code.