as well as the next value
your_sequence_name.nextval
-----Original Message-----
From: CFDEV [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 19, 2004 3:34 PM
To: CF-Talk
Subject: RE: oracle unique id or identity
you can also see the previous value with <your_sequence_name.prevval> or the
current one with <your_sequence_name.currval>
_____
From: Yexley Robert D Contr AFRL/PROE [mailto:[EMAIL PROTECTED]
Sent: May 19, 2004 16:25
To: CF-Talk
Subject: RE: oracle unique id or identity
Oracle doesn't have any kind of unique-id or identity datatype for table
columns. Instead, you need to use a "SEQUENCE" which is a standalone object
inside an Oracle schema which generates unique numbers based on how you
define the sequence when it's created. So, to use that in a table, you need
to create a sequence, and then create your table with a column called
something like "ID" with a NUMBER datatype, and when you insert new records
into that table, the ID column value becomes something like
<your_sequence_name.nextval> (without the <>s). For more information about
it, lookup SEQUENCE in the Oracle SQL Reference.
<.YEX.>
-----Original Message-----
From: Daniel Kessler [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 19, 2004 4:09 PM
To: CF-Talk
Subject: oracle unique id or identity
I'm trying to make an auto-incrementing ID field in ORACLE. In sql,
I believe that I make it have an attribute of IDENTITY. I can't seem
to find how to do that in ORACLE. Here's my latest attempt:
create table hhp_calendar (
id INT unique id,
dateAdded date,
event_date date,
header VARCHAR2(200),
description VARCHAR2(3000),
http VARCHAR2(100),
image VARCHAR2(100),
image_h INT,
image_w INT
)
He-elp.
--
Daniel Kessler
Department of Public and Community Health
University of Maryland
Suite 2387 Valley Drive
College Park, MD 20742-2611
301-405-2545 Phone
www.phi.umd.edu
_____
_____
_____
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
- RE: oracle unique id or identity Jason.Gulledge
- RE: oracle unique id or identity Yexley Robert D Contr AFRL/PROE
- Re: oracle unique id or identity daniel kessler
- RE: oracle unique id or identity CFDEV
- oracle unique id or identity Daniel Kessler
- Re: oracle unique id or identity Jochem van Dieten
- RE: oracle unique id or ident... CFDEV
- Re: oracle unique id or ident... daniel kessler
- RE: oracle unique id or identity Yexley Robert D Contr AFRL/PROE
- Re: oracle unique id or identity daniel kessler
- RE: oracle unique id or identity Yexley Robert D Contr AFRL/PROE