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: Jacques Kilchoer <Jacques.Kilchoer_at_quest.com>
Date: Tue, 20 Mar 2001 09:52:04 -0800
Message-ID: <F001.002D1F97.20010320095054@fatcity.com>

> -----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 Received on Tue Mar 20 2001 - 11:52:04 CST

Original text of this message

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