posted 23 years ago
Hi Bobby,
Try this procedure in scott/tiger schema:
====================================
CREATE OR REPLACE PROCEDURE SHOW_EMPLOYEES
AS
V_RECORD EMP%ROWTYPE;
BEGIN
SELECT *
INTO V_RECORD
FROM EMP
WHERE EMPNO=7934;
END;
/
====================================
Points to be considered
1. Use of INTO clause while using SELECT as record is being fethced and assigning it to a record.
2. Only ONE record can be fetched through select/into statement in a procedure (use of where clause).
3. First you have to declare a variable (here I have declare a variable of record type as the whole record is in question).
HIH,
[ April 09, 2002: Message edited by: Muhammad Farooq ]
Muhammad Farooq<br />Sun Certified Programmer for Java 2 Platform<br />Oracle8i Certified Professional Database Administrator