resetting auto increment


I have made a table with a primary key that is set to auto increment every time.

As I am doing various test in the particular table, many times, I delete rows.

I notice though, that the auto increment value never starts from 1(after I have deleted all the rows of the table),it just continues
from where it was left last time.
If the row I deleted had the value of 10, then the newly created row will have the value of 11, even if this is going to be the first row created, after deletion of previous rows.

I use PHPMyAdmin
What can I do to fix this

I fixed it, the only thing that needed was to use the "empty table" command.
Edited by jimfog, 20 November 2012 - 03:48 PM.
Posted On: Sunday 30th of December 2012 11:23:02 PM Total Views:  251
View Complete with Replies

RELATED TOPICS OF Microsoft SQL Server PROGRAMMING LANGUAGE




Static IP public address

I have a server with some tables on SQL and I need then to be accessed from outside. I already opened the ports on the router but when the internet goes down for a while or I restart the server I lost the public address. Is there any way to have a static one\t so I dont loose on this cases...
VIEWS ON THIS POST

249

Posted on:

Sunday 11th November 2012
View Replies!

How to convert hexa string to varbinary?

hi I have this script to get the default value of a column dynamically ,it works for most columns types except for varbinary that has default hex value, when @t = 0x0343 ,then @v =0x03 note that I had to use nvarchar(4000) at first because INFORMATION_SCHEMA.COLUMNS forces me to do so, can you help me thanks in advance ----------------------------------- create table #temp ( column_name sysname, column_def nvarchar(4000) ) insert into #temp SELECT column_name,column_default FROM INFORMATION_SCHEMA.COLUMNS where table_Name ='table_1' declare @t nvarchar(4000) set @t=(select column_def from #temp where column_name='c_varbin') set @t = replace (@t ,'(','') set @t = replace (@t ,')','') select @t declare @v varbinary set @v = convert ( varbinary,@t) select @v drop table #temp -----------------------------------
VIEWS ON THIS POST

167

Posted on:

Tuesday 20th November 2012
View Replies!

Append new properties to sql statement

Like mentioned above, i'm trying to append more SQL statement into existing SQL statement in "Stored Procedures" in MS SQL Server (in "Enterprise Manager App" part). Eg. Existing SQL statement in Stored Procedures is:- Code: SELECT * FROM Table1 Then i add a string from ASP page with VBscript where the string contains string SQL code to be appended:- Code: WHERE banana=@b Becoming Code: SELECT * FROM Table1 WHERE banana=@b Thx
VIEWS ON THIS POST

108

Posted on:

Tuesday 20th November 2012
View Replies!

How many DB's are to much?

Ok, I run a video game site and right now I'm using Access databases. I've made quite a few topics about converting recently and I'm about to make the move. My final question about converting is how I should set up my MySQL DB. Currently I have an access database for users, a DB for each game consoles cheats, a DB for several different boards, and a few others. I formatted it this way with Access because Access only allows so many users to connect at once and the more users that connect the slower it gets. Plus I wanted to keep the DB size down. My question is, should I have more than one MySQL DB like I do with the Access DB's now Another large gaming site (gamefaqs.com) has message boards and cheat codes for every game as well as a lot of users (sometimes 5000 on at once). I believe they use MySQL but I was wondering if a site like that has more than one MySQL db. Does it matter how many MySQL DBs I have Will the speed of the site slow down and how many users will be allowed at once If anyone can help with these basic questions as well as any other things I should know then help me out.
VIEWS ON THIS POST

124

Posted on:

Tuesday 20th November 2012
View Replies!

SQL Server info

Hi... I'm looking for some information on how SQL Server and MySQL work when using ASP.NET (VB.NET). I've only used access but now need to learn this technology... If anyone could post a link to some information or tell me themselves then this would be appreciated ...
VIEWS ON THIS POST

170

Posted on:

Monday 26th November 2012
View Replies!