Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Insert statement and a plsql record

Insert statement and a plsql record

From: Marc Weinsock <MWeinstock_at_lds.com>
Date: Thu, 23 Dec 1999 15:17:07 GMT
Message-ID: <38623D94.2BA24DAD@lds.com>


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);

end;

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

--



Marc Weinstock
Logical design Solutions

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US