On Mon, 12 Mar 2001 20:52:02 +0000 (UTC), [EMAIL PROTECTED] ("Josh
Berkus") wrote:

>1. Unlike PostgreSQL, MSSQL server will not permit you to override an
>"Identity Value" auto-incrementing field;

That's almost correct. You cannot *update* an identity column, but you
can override it on insert if you use
    SET IDENTITY_INSERT tablename ON

create table foo (id integer identity, txt varchar(10))
go
insert into foo (txt) values ('a')
insert into foo (txt) values ('b')
set identity_insert foo on
insert into foo (id, txt) values (10, 'c')
set identity_insert foo off
insert into foo (txt) values ('b')
select * from foo

id          txt        
----------- ---------- 
1           a
2           b
10          c
11          d

(4 row(s) affected)

.02 by
 Carl van Tast

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl

Reply via email to