Declare a PL/SQL record based on the structure of the DEPT table. Use a substitution variable to retrieve information about a specific department and store it in the PL/SQL record. Print the record information using DBMS_OUTPUT.PUT_LINE.
What will be an ideal response?
```
SQL> DECLARE
2 dept_rec dept%ROWTYPE;
3 dept_id dept.DeptId%TYPE := &department_id;
4 BEGIN
5 SELECT *
6 INTO dept_rec
7 FROM dept
8 WHERE DeptId = dept_id;
9 DBMS_OUTPUT.PUT_LINE('Dept Id: ' || dept_rec.DeptId);
10 DBMS_OUTPUT.PUT_LINE('Dept Name: ' || dept_rec.DeptName);
11 DBMS_OUTPUT.PUT_LINE('Location: ' || dept_rec.Location);
12 DBMS_OUTPUT.PUT('EmployeeId: ' || dept_rec.EmployeeId);
13 END;
14 /
Enter value for department_id: 10
Dept Id: 10
Dept Name: Finance
Location: Charlotte
EmployeeId: 123
PL/SQL procedure successfully completed.
```
You might also like to view...
During run time, you can determine whether a check box is selected or unselected by looking at the value in its Checked property.
Answer the following statement true (T) or false (F)
What is a data type? List the data types commonly found in a database.
What will be an ideal response?
?The white-space property of an element is set to _________, which keeps inline content on a single line, preventing line wrapping.
Fill in the blank(s) with the appropriate word(s).
List three jobs performed by the operating system kernel.
What will be an ideal response?