Collections:
Other Resources:
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
2016-10-17, 309👍, 0💬
Popular Posts:
How To Change the Name of a Database User in SQL Server? If you want to change the name of an existi...
How do you know if SQL Server is running on your local system in SQL Server? After installing SQL Se...
Why I Can Not Enter 0.001 Second in DATETIME values in SQL Server Transact-SQL? If you enter millise...
What is Microsoft SQL Server in SQL Server? Microsoft SQL Server is a relational database management...
What are binary literals supported in SQL Server Transact-SQL? Binary literals in Transact-SQL are s...