List:General Discussion« Previous MessageNext Message »
From:Denis Gerasimov Date:February 10 2005 10:59am
Subject:How to specify autoincrement primary key value
View as plain text  
Hello,

One simple question... AFAIK I can specify value for an autoincrement
primary key (int) when inserting a record like this:

INSERT INTO `tablename` (`id`, `name`) VALUES (1, 'test')

But it doesn't work for id = 0. Why?

I would like to use some primary key values for special purpose, e.g. id 0
means root/default record and so on.
Is that recommended? Are there any alternative ways?

Best regards, Denis Gerasimov
Outsourcing Services Manager,
VEKOS, Ltd.
www.vekos.ru



Thread
How to specify autoincrement primary key valueDenis Gerasimov10 Feb
  • Re: How to specify autoincrement primary key valueAlec.Cawley10 Feb
RE: How to specify autoincrement primary key valueDenis Gerasimov10 Feb
  • Re: How to specify autoincrement primary key valueMartijn Tonies10 Feb
    • RE: How to specify autoincrement primary key valueDenis Gerasimov18 Feb