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

Home -> Community -> Usenet -> c.d.o.server -> Re: PL/SQL Insert

Re: PL/SQL Insert

From: Daniel Clamage <dclamageNOSPAM_at_telerama.com>
Date: 2 Sep 1998 17:34:32 -0400
Message-ID: <01bdd68e$5547a260$ec28c9cd@saturn>


You can skip the list of columns when you are using all columns, in the order in which they occur in the table. You still have to list every value to match every column in the VALUES clause. You could partially automate getting the columns list by querying the data dictionary, i.e. user_tab_columns.
--
- Dan Clamage
http://www.telerama.com/~dclamage
If you haven't crashed the Server,
you haven't been trying hard enough.

dejaron_at_my-dejanews.com wrote in article <6sk8hj$cu4$1_at_nnrp1.dejanews.com>...
> Is there a simple way to INSERT a row without having to list each field
name?
> Here's a code example...
>
>
> DECLARE
>
> data_record data_file%ROWTYPE;
>
> BEGIN;
>
> data_record.fld_a := 'ABC123';
> data_record.fld_b := 1234.56;
>
> INSERT INTO data_file
> {what to put here?}
>
> END;
>
>
> I have a large record with over 100 fields and listing them (specifically
> maintaining them) is a hassle.
>
> Your help is appreciated.
>
>
>
>
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
>
Received on Wed Sep 02 1998 - 16:34:32 CDT

Original text of this message

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