Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Insert statement and a plsql record
Is there any way to use a plsql record to insert into a table without
specifying every column. The following make more sense.
create table1 (
col1 number,
col2 number);
DECARE
rec_table1 table1%rowtype;
BEGIN
rec_table1.col1 := 1;
rec_table1.col1 := 2;
--I want something like this:
INSERT INTO table1
SELECT * from rec_table1;
--or like this
INSERT INTO table1
rec_table1;
--I do not want this
INSERT INTO table1
VALUES(
rec_table1.col1, rec_table1.col2);
The first to options do not compile. Does any one know the syntax?
I have a very wide table and I do not want to retype the insert statment
columns every time.
Thanks
--
55 Broadway - 21st Floor
New York, New York 10006
Phone: 800.221.5327 x2136
Fax: 212-825-2245
E-Mail: MWeinstock_at_lds.com
Web: http://www.lds.com
Received on Thu Dec 23 1999 - 09:17:07 CST
![]() |
![]() |