Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL - is inserting of %ROWTYPE variable possible?
DA Morgan <damorgan_at_exesolutions.com> wrote in
news:3E1C4FE3.73E34A28_at_exesolutions.com:
> Rauf Sarwar wrote: >
> > And not only NO ... but change the table name. TAB is the name of a > view owned by SYS. > > Daniel Morgan
This is why version number and full version number is important though, because it is a new feature in 9iR2. So you can do this, whether its advisable or not is another matter, particularly if there is a SQL alternative.
SQL> select * from v$version;
BANNER
SQL> declare
2 emp_rec emp%rowtype;
3 begin
4 select * into emp_rec from emp where rownum = 1; 5 emp_rec.empno := 999; 6 emp_rec.ename := 'ROONEY'; 7 insert into emp values emp_rec;
SQL> select * from emp where empno = 999;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO ------ -------- --------- ------ --------- ------ ------ -------
999 ROONEY CLERK 7902 17-DEC-80 800 20 SQL> Martin Received on Thu Jan 09 2003 - 19:08:49 CST
![]() |
![]() |