-2

I have deleted all my old table entries i want to reset The UserID (primary key) column of my table in Visual Studio 2010. Kindly guide how to do that.

abatishchev
  • 98,240
  • 88
  • 296
  • 433
Sana Zehra
  • 25
  • 1
  • 6

2 Answers2

0

You need to be able to run a sql statement (and have proper permissions for it to execute).

DBCC CHECKIDENT 
 ( 
    table_name
        [, { NORESEED | { RESEED [, new_reseed_value ] } } ]
)
[ WITH NO_INFOMSGS ] 
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
automatic
  • 2,727
  • 3
  • 34
  • 31
  • If you post code, XML or data samples, **PLEASE** highlight those lines in the text editor and click on the "code samples" button ( `{ }` ) on the editor toolbar to nicely format and syntax highlight it! – marc_s Mar 18 '12 at 15:35
-1

Visual Studio Server Explorer is just a client. You want to reset identity column value, in server table. Do you fill the difference?! Say between Email and Outlook, Internet and Firefox?

(I hope I've gave you a good enough tip what to google for)

abatishchev
  • 98,240
  • 88
  • 296
  • 433
  • no not in server table it goes like Server explorer>Database>Tables>Registration(thats My table name) and there is a column in this table UserId which has been set as a primay key ... i want to **reset** its value back to 1 .. how can i do that in **VS 2010 Environment**?? – Sana Zehra Mar 18 '12 at 16:13