Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> auto increment? 'enum' data type?
Hi,
I'm new to Oracle and am wondering what's the best/easiest way to make a column 'auto increment' (e.g. an ID column used as a primary key)? Do I have to make a sequence in my schema for that particular column/table/database? Or can I specify something like 'AUTO INCREMENT' when I do CREATE TABLE .... (doesn't seem to be the case).
I am also wondering if there is a data type that will let me specify a
list of all possible values that a column can have, so that no other
value can be inserted in that column?
In MySQL I would do somehting like this, for example:
gender enum('Male','Female')
How about under Oracle?
Thanks,
Otis
P.S.
I ordered an Oracle book, it's just hasn't been delivered yet...
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Tue Jan 25 2000 - 23:03:03 CST