Thursday, March 29, 2012

formula in sql server

hi,
my users can make posts in my web application, i mean they fill a form and the information they filled will be saved in sql server 2000 and can be shown in web application,now i want to give each post an Id and save it in the database, how can i do that? does sql server have the abilities or i should do sth in my c# application

thanx

This is something that is best to let the database handle for you.

Set your ID column as an Identity column in your sql table.

Sql server will then set its value to a unique auto incrementing value automatically every time a new row is inserted.

No comments:

Post a Comment