Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How To Define a RECORD Variable to Store a Table Row
How To Define a RECORD Variable to Store a Table Row? - Oracle DBA FAQ - Working with Database Objects in PL/SQL
✍: FYIcenter.com
If you have a table, and want to define a RECORD variable to store all the data elements of a row from that table, you can use table_name%ROWTYPE to define the RECORD variable as shown in the following sample script:
CREATE TABLE student (id NUMBER(5) PRIMARY KEY, first_name VARCHAR(80) NOT NULL, last_name VARCHAR(80) NOT NULL); Table created. CREATE OR REPLACE PROCEDURE FYI_CENTER AS best_student student%ROWTYPE; another_student student%ROWTYPE; class_name VARCHAR2(80); BEGIN class_name := 'FYI Center 2006'; best_student.first_name := 'The'; best_student.last_name := 'Best'; DBMS_OUTPUT.PUT_LINE('Best student ID = ' || best_student.id); DBMS_OUTPUT.PUT_LINE('Best student = ' || best_student.first_name || ' ' || best_student.last_name); END; / Best student ID = Best student = The Best
2007-04-27, 4647👍, 0💬
Popular Posts:
How To Use Subqueries with the IN Operator? - MySQL FAQs - SQL SELECT Statements with JOIN and Subqu...
What are the two kinds of comments in JSP and what's the difference between them? <%-- JSP Co...
What is the difference between include directive & jsp:include action? Difference between includ...
What is the version information in XML? “version” tag shows which version of XML is used.
Regarding C Coding Given: Line in file Contents 30 int * someIDs, theFirst, *r; 110 someIDs =GetSome...