Solved

increase table ID's to so next record is a larger ID (instead of next id 20  make it 2000)

Posted on 2016-09-29
2
24 Views
Last Modified: 2016-09-30
Bit of a random one this!

I basically need the next auto incremented identity seed ID of a table to goto something like 2000 instead of 20

the reason.....
We have a automated feature where users can sign up to a free trial
It inserts their details into a table, and uses that ROW ID as part of the domain name
i.e.
http:/20.mydomain.com

the next user who signs up gets
http:/21.mydomain.com

The problem is it makes us really small (we are a startup!) so we want to appear bigger
So,  we'd like to increase the primary key on this table so they boost up to the 1000s so the next record is
http:/2000.mydomain.com

this way it makes us look big as people will think 2000 people have signed up for the trial (and not 20!)

Is there an quick and easy way to do this?
0
Comment
Question by:websss
2 Comments
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 41823075
use this command:
DBCC CHECKIDENT (yourtablename, RESEED, 2000) ;  
https://msdn.microsoft.com/en-us/library/ms176057.aspx
1
 

Author Closing Comment

by:websss
ID: 41823202
I always love it when I see you have replied!

Thanks!
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MS SQL - Rotating Values in SQL 9 50
SQL Server Deadlocks 12 49
T-SQL:  Negative Numbering in CTE Is Not Working 2 29
datetime in sql 6 24
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
I have a large data set and a SSIS package. How can I load this file in multi threading?
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now