Collections:
Assign a Table Row to RECORD Variable in Oracle
How To Assign a Table Row to a RECORD Variable in Oracle?
✍: FYIcenter.com
If you have a table, and want to assign a data row of that table to a RECORD variable, you need to define this RECORD variable to match the table column structure, then use the SELECT ... INTO statement to assign a data row that RECORD variable. The script below shows you how to do this:
CREATE OR REPLACE PROCEDURE FYI_CENTER AS
manager employees%ROWTYPE;
BEGIN
SELECT * INTO manager FROM employees
WHERE employee_id = 100;
DBMS_OUTPUT.PUT_LINE('My manager = ' ||
manager.first_name || ' ' || manager.last_name);
END;
/
My manager = Steven King
⇒ Insert a RECORD into a Table in Oracle
⇐ Define a RECORD Variable for a Table Row in Oracle
2018-08-14, 2186🔥, 0💬
Popular Posts:
How To Drop an Index in Oracle? If you don't need an existing index any more, you should delete it w...
Where to find MySQL database server tutorials? Here is a collection of tutorials, tips and FAQs for ...
How To Verify Your PHP Installation in MySQL? PHP provides two execution interfaces: Command Line In...
How To Connect to a MySQL Server with a Port Number in MySQL? If you want to connect a MySQL server ...
What Is an Oracle Instance in Oracle? Every running Oracle database is associated with an Oracle ins...