?
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
Medium Priority
?
48 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 2000 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…
Suggested Courses

752 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