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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Insert without telling column names

RE: Insert without telling column names

From: Rachel Carmichael <carmichr_at_hotmail.com>
Date: Wed, 21 Mar 2001 06:53:28 -0800
Message-ID: <F001.002D2F29.20010321053055@fatcity.com>

I've managed to get it through my programmers heads that they have to ALWAYS specify column names in any DML statement.

Since they work in the same development database, and often need changes made to the same parent table, this prevents the "WHO SCREWED UP MY PROGRAM?" questions

>From: jkstill_at_cybcon.com
>Reply-To: ORACLE-L_at_fatcity.com
>To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
>Subject: RE: Insert without telling column names
>Date: Tue, 20 Mar 2001 14:18:13 -0800
>
>
>Well of course it's a bad idea, I thought
>that was obvious. ;)
>
>Jared
>
>On Tue, 20 Mar 2001, Jacques Kilchoer wrote:
>
> > > -----Original Message-----
> > > From: Roland.Skoldblom_at_ica.se [mailto:Roland.Skoldblom_at_ica.se]
> > >
> > > How can I create an insert statement without telling all the
> > > names of the columns?
> > > Give an example, please.
> >
> >
> > As Jared mentioned, if you are inserting into all the columns in a
>table,
> > you don't need to specify the column names. But this is a BAD IDEA,
>because
> > if someone adds a column to the table all your insert statements written
> > without column names will fail unless you add values for the new column
>to
> > the insert statement. So while this might be OK when typing in SQL for
> > "one-time" use, don't use this method in any programs/scripts that will
>be
> > used more than once.
> >
> > ------
> > any ignorant comments made are the sole responsibility of J. R. Kilchoer
>and
> > should not reflect adversely upon my employer.
> >
> > Jacques R. Kilchoer
> > (949) 754-8816
> > Quest Software, Inc.
> > 8001 Irvine Center Drive
> > Irvine, California 92618
> > U.S.A.
> > http://www.quest.com
> >
> >
> >
>
>--
>Please see the official ORACLE-L FAQ: http://www.orafaq.com
>--
>Author:
> INET: jkstill_at_cybcon.com
>
>Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
>San Diego, California -- Public Internet access / Mailing Lists
>--------------------------------------------------------------------
>To REMOVE yourself from this mailing list, send an E-Mail message
>to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
>the message BODY, include a line containing: UNSUB ORACLE-L
>(or the name of mailing list you want to be removed from). You may
>also send the HELP command for other information (like subscribing).



Get your FREE download of MSN Explorer at http://explorer.msn.com
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Rachel Carmichael
  INET: carmichr_at_hotmail.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Wed Mar 21 2001 - 08:53:28 CST

Original text of this message

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