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: Automatic random number on row creation

Re: Automatic random number on row creation

From: Cris Carampa <cris119_at_operamail.com>
Date: Thu, 29 Dec 2005 17:18:19 +0100
Message-ID: <43b40c75$0$329$5fc30a8@news.tiscali.it>


Kuon wrote:

> I know something like that:
> select dbms_random.string('U', 20) str from dual
>
> for my random number.
>
> But how, when I do:
>
> insert into myTable (otherInfos) values ("myotherinfos"),
>
> how can the "key" column been automaticaly assigned a random and unique
> string?

insert into myTable (key,otherInfos) values (dbms_random.string('U',20),"myotherinfos");

Or am I missing something?

Kind regards,

-- 
Seven-hundred tons of metal a day
Now sir you tell me the world's changed
Once I made you rich enough
Rich enough to forget my name
Received on Thu Dec 29 2005 - 10:18:19 CST

Original text of this message

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