Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Inserting using identity

Author  Topic 

sqllearner
Aged Yak Warrior

639 Posts

Posted - 2004-07-28 : 18:11:32
In which cases should i use ident_seed and ident_incr in a table when I want to insert values into a table of this kind.Here after insertion I want to make the active_id as identity column

CREATE TABLE tbl_emp_details] (
[active_id] [int] NOT NULL ,
[emp_id] [varchar] (13) NOT NULL ,
[reference_id] [int] NOT NULL ,
[name] [varchar] (50) NULL ,
[process_type] [int] NULL ,
[active_date] [datetime] NULL ,
[status] [varchar] (20) NULL ,
[start_date] [datetime] NULL ,
[end_date] [datetime] NULL ,
[error_log] [varchar] (900) NULL
)

timmy
Master Smack Fu Yak Hacker

1242 Posts

Posted - 2004-07-28 : 18:54:21
What are you trying to do? Do you mean that you want to explicitly specify the Active_ID values? Or do you want the DB to do it?
If the latter, you will need to use the IDENTITY(ident_seed, ident_incr) clause on the column when you create it.
Go to Top of Page
   

- Advertisement -