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: Auto incrementing key

Re: Auto incrementing key

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Sun, 9 Apr 2006 19:56:13 +0200
Message-ID: <44394abe$0$19001$626a54ce@news.free.fr>

<chanakam2000_at_gmail.com> a écrit dans le message de news: 1144603561.080923.244840_at_v46g2000cwv.googlegroups.com...
| Hi,
|
| Please help me,
|
| I'm new to oracle environment.
| I want to make a kind of auto generated primary key for my table.
| I can make auto key with sequences and triggers. But only numeric
| keys
| But i want the key with some character value.
|
| Ex : for student_id column my preffered value sequence is
|
| S-00001
| S-00002
| S-00003 ..... & so on
|
| I searched lot in internet. But could not find goood solution.
| Please give me some idea.
|
| If this is not possible please give me idea to generate sequence like
| 00001,00002,00003....
|
| By using sequence i could only generate 1,2,3 & not 000001 ..etc
|
| If you don't mind please emil me to chanakam2000_at_gmail.com or else
| please answer to this group. I can visit.
|
| Hoping your kind help!
|

As you are new let me give you an advice. You are surely not the first one to ask yourself such a question so before posting make a little search on Google you'll surely find the answer.

Another point, when you post always tell us your Oracle version, OS name and version. Many answers depend on these parameters.

Regards
Michel Cadot Received on Sun Apr 09 2006 - 12:56:13 CDT

Original text of this message

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