List Info

Thread: Re: Why do we avoid auto-incrementing db columns?




Re: Why do we avoid auto-incrementing db columns?
country flaguser name
United States
2007-04-25 10:40:58
FYI: SQL Server's version is the IDENTITY field. E.g.
CREATE TABLE x ( id INT IDENTITY(1,1) PRIMARY KEY);

-----Original Message-----
From: development-bouncesdrupal.org
[mailto:development-bouncesdrupal.org]
On Behalf Of Syscrusher
Sent: Wednesday, April 25, 2007 10:52 AM
To: developmentdrupal.org
Cc: Ezra B. Gildesgame
Subject: Re: [development] Why do we avoid auto-incrementing
db columns?

On Wednesday 25 April 2007 10:29, Ezra B. Gildesgame wrote:
> I happened to discuss this with Greg Knaddison
yesterday.
> MySQL 4 does not support auto-incrementing columns.

I must respectfully disagree. I happened to have a copy of
the MySQL
reference book from version 3.22 sitting on my bookshelf,
and AUTO_INCREMENT
was supported even then.  Never mind
the question of why I still have
such
an old book....

I also checked a PostgreSQL reference book, and they offer a
SERIAL
column type that works very similarly to the AUTO_INCREMENT
in MySQL. I
don't
know how far back this support goes; my book is for PG
version 8.something
and
was copyright 2006.

I can't comment on the Microsoft SQL Server implementation
of this, if any,
because I don't have any manual for that here.

Scott

-- 
------------------------------------------------------------
----------------
---
Syscrusher (Scott Courtney)          Drupal page:
http://drupal.org/user/91
84
syscrusher at 4th dot com            Home page:     http://4th.com/   


Re: Why do we avoid auto-incrementing db columns?
country flaguser name
United States
2007-04-25 11:18:59
On Wednesday 25 April 2007 11:40, Earnest Berry III wrote:
> FYI: SQL Server's version is the IDENTITY field. E.g.
> CREATE TABLE x ( id INT IDENTITY(1,1) PRIMARY KEY);

Thanks! I assumed there was some equivalent function, but
didn't have the
reference info to look it up.

Scott

-- 
------------------------------------------------------------
-------------------
Syscrusher (Scott Courtney)          Drupal page:   http://drupal.org/user/91
84
syscrusher at 4th dot com            Home page:     http://4th.com/   

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )