-----------------------------------------------------------

New Message on MumbaiUserGroup

-----------------------------------------------------------
From: Star_Venkat
Message 1 in Discussion

  
Inserting Datas into Identity column and Reseeding the table: 
Lets see some additional functionalities to be implemented if the column have 
been  
specified as identity column. 
create table VenkatTable(Usergroup int identity(1,1)) 
insert into VenkatTable(a) default values  
select * from VenkatTable 
A row have been inserted with value as one. If i try to insert any values 
manually, sql server 
table wont accept to insert a row into the table. Its asking to shut down the 
identity insert property. 
insert into VenkatTable(Usergroup) values ('16') 
The syntax for identity insert to be switch off is, 
set identity_insert VenkatTable off. 
If we try with the above specified insert statement, my row gets updated 
automatically. 
Consider, my scenario is to reset my identity value to 0. Once i have reached 
100 rows. 
dbcc checkident (VenkatTable, reseed, 0) 
The above Database Consistency Checker property will reset the table's identity 
value  
to the specified number in the query. 
Regards, 
Venkatesan Prabu. J

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/MumbaiUserGroup/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member 
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you 
received this message by mistake, please click the "Remove" link below. On the 
pre-addressed e-mail message that opens, simply click "Send". Your e-mail 
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to