Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Alter Table? Identity

Status
Not open for further replies.

xtendscott

Programmer
Joined
Apr 21, 2003
Messages
276
Location
US
OK, an ISP did a restore from my database backup and I think it lost its IDENTITY value. I have tried the following code to fix it but I get a "Incorrect syntax near the keyword 'IDENTITY'."
Code:
<cfquery name="alter_Table" datasource="#application.dsn#" username="#application.datalogin#" password="#application.datapass#">
	ALTER TABLE users
		ALTER COLUMN user_ID INT IDENTITY(60,1) NOT NULL 

</cfquery>

It needs to remain its Primary Key value too.

Thanks in advance.

 
If you are trying to reseed the identity column to a specific value in MS SQL Server...

DBCC CHECKIDENT ('table_name', RESEED, new_reseed_value)

--Angel [rainbow]
-----------------------------------
Behold! As a wild ass in the desert
go forth I to do my work.
--Gurnie Hallock (Dune)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top