[ic] autonumber with mySQL
racke at linuxia.de
Thu Jan 15 08:53:19 EST 2004
On Wed, 14 Jan 2004 23:43:00 +0000 (UTC)
Jon Jensen <jon at endpoint.com> wrote:
> On Wed, 14 Jan 2004, Grant wrote:
> > > Do I have another shot in the dark <g> ? I think you missing NOT NULL for
> > > the code column.
> > Thank you very much for your help Racke and Rene. The NOT NULL was missing.
> I don't see how that can be the case. The MySQL documentation says (and a
> quick test creating a table in MySQL verifies):
> > A PRIMARY KEY is a unique KEY where all key columns must be defined as NOT
> > NULL. If they are not explicitly declared as NOT NULL, it will be done
> > implicitly (and quietly).
mysql> create table foo (bar int, primary key(bar));
ERROR 1171: All parts of a PRIMARY KEY must be NOT NULL; If you need NULL in a key, use UNIQUE instead
LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team
More information about the interchange-users