One more silly question,

What is an identity column? how can I define it?

table abc
=========
no (primary key) name
================ ====
1 jung
2 love
4 tom

In this example, I want to define 'no' as an identify column so that I can update it as I wish.

Thanks in advance,


-----------------------------------------------------------------------------
Subject:
From:
Date: sorry one more question (reply)
Kurt ()
6/23/01 2:48:32 AM

Jung,
Take a look at your table. It looks like you don't have an identity column
defined for "no" (your column name). Set Indentity_Insert doesn't work for tables that don't have one defined. PS A primary key is not the same as an Idendtity column.


------------
jung at 6/22/01 9:49:34 PM


table : abc

no (primary key) name
================ ====
1 jung
2 love
4 tom


In this record, I wanted to update no 4 to 3 which is primary key.
So, I used the query as below.
=============================
Set Identity_insert abc on

UPDATE abc
SET no = 3
WHERE no = 4

Set Identity_insert abc off
go
=============================
But I got an error;
Server: Msg 8106, Level 16, State 1, Line 1
Table 'abc' does not have the identity property. Cannot perform SET operation.

Why this happens? I really want to update the primary key.