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 -> Re: Default Values

Re: Default Values

From: scotty <invalid-spammer_at_invalid.invalid>
Date: Wed, 06 Nov 2002 11:20:58 +0000
Message-ID: <oiuhsuc5bad136clnn63bu357bq37j7bb6@4ax.com>


Niall Litchfield wrote:

[snip]

>According to me the table you have will perform as expected (the below was
>oracle 9.2)

Using 8 here. Perhaps I should move to 9.

[snip]

>Table created.
>
>SQL> insert into customer(customer_id,surname,forename)
>values(1,'SMITH','JOHN');
>
>1 row created.
>
>SQL> COMMIT;
>
>Commit complete.

Ah COMMIT, haven't used that before. Maybe that was the problem?

>SQL> SELECT * FROM CUSTOMER;
>
>CUSTOMER_ID TITL SURNAME FORENAME
>----------- ---- -------------------- --------------------
> 1 mr SMITH JOHN
>
>SQL>
>
>However I would strongly suggest that you change your CHAR fields to
>Varchar2. Apart from anything else your default value for Title isn't 'mr'
>but in fact 'mr '. This fact alone might be causing your problems on
>earlier versions. It also looks somewhat odd to say the least that you want
>names in caps and titles in lowercase.

Yes it is rather odd isn't it. This is the first time ive used constraints so the table is just a test really.

Thanks for the help though. Received on Wed Nov 06 2002 - 05:20:58 CST

Original text of this message

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