Re: to add table with primary key
- From: bret@xxxxxxxxxx
- Date: Thu, 28 Feb 2008 15:34:12 -0800 (PST)
On Feb 28, 5:42 am, Bum...@xxxxxxxxx wrote:
create table au_clients (
id numeric(10,0) not null,
name varchar(255) not null,
constraint au_clients_pk primary key (id))
with identity_gap = 10
go
/* default users */
insert into au_clients (name) values ('default')
go
I want that primary key started with 0. in this case i must to write
with identity_gap = 0?
No, you can't do it. Identity values start at 1 and go up. It is not
possible to insert or update
identity values to a negative or zero value.
.
- Follow-Ups:
- Re: to add table with primary key
- From: Bumsys
- Re: to add table with primary key
- References:
- to add table with primary key
- From: Bumsys
- to add table with primary key
- Prev by Date: Re: Can I tell if arithabort numeric_truncation is set using a T-SQL statement?
- Next by Date: Re: table + primary key
- Previous by thread: to add table with primary key
- Next by thread: Re: to add table with primary key
- Index(es):