Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Question about insert and defaut values
I think I have to checked out that option, but I think it didn't work.
Anyway, what if I have three columns and the second one has a default
value?
I'm insisting on a positional approach because many Insert statements I had on SQL Server (a VB program) use that approach and I have no time to specify columns. I tested:
INSERT INTO TABLE
VALUES ( 'AnyName', , 'AnyValue' )
and received an error message.
Thanks in advance,
On Sun, 21 Mar 1999 13:50:39 +0800, Andrew Babb <andrewb_at_mail.com> wrote:
>Hi,
>
>Within Oracle you simply do not specify the column in the insert
>statement. oe.
>
>INSERT INTO TABLE ( NAME )
>VALUES ( 'Any Name');
>
>Hope this helps,
>Andrew
>
>Eugenio Reis wrote:
>
>> Hi,
>>
>> Maybe this is a FAQ, but I'm coming from SQL Server and have a simple
>> question:
>>
>> How to insert a default value?
>>
>> Example
>>
>> NAME VARCHAR2(40) NOT NULL
>> AGE NUMBER(2) DEFAULT 0
>>
>> In SQL Server I could write
>>
>> INSERT INTO TABLE VALUES ( 'Any name', default )
>>
>> How can I do the same in Oracle?
>>
>> Thanks,
>>
>> Eugenio Reis
>> ** Remove the primes to get the real e-mail
>
Eugenio Reis
** Remove the primes to get the real e-mail
Received on Sun Mar 21 1999 - 07:03:31 CST
![]() |
![]() |