[Catalyst] Catalyst and Oracle
Sean Davis
sdavis2 at mail.nih.gov
Mon Aug 15 21:09:34 CEST 2005
On 8/15/05 2:48 PM, "Simon Miner" <sminer at christianbook.com> wrote:
> Is PostgresSQL's "serial" like MySQL's "auto increment". If so, I don't
> believe Oracle supports this. It uses sequence objects instead.
Just for the record, "Nope." Serial is just a "macro" for defining the
sequence and defaults for the column.
>From the postgres docs:
"The data types serial and bigserial are not true types, but merely a
notational convenience for setting up unique identifier columns (similar to
the AUTO_INCREMENT property supported by some other databases). In the
current implementation, specifying
CREATE TABLE tablename (
colname SERIAL
);
is equivalent to specifying:
CREATE SEQUENCE tablename_colname_seq;
CREATE TABLE tablename (
colname integer DEFAULT nextval('tablename_colname_seq') NOT NULL
);"
More information about the Catalyst
mailing list