Re: [sqlite] Reset auto increment / truncate

2008-04-04 Thread uk webdev

Excellent. Exactly what I was looking for. Thank you very much indeed.

> To: sqlite-users@sqlite.org
> From: [EMAIL PROTECTED]
> Date: Fri, 4 Apr 2008 07:37:17 -0400
> Subject: Re: [sqlite] Reset auto increment / truncate
> 
> "uk webdev" <[EMAIL PROTECTED]> wrote in
> message news:[EMAIL PROTECTED]
> > I've searched high and low and I cannot find any information on how
> > to reset an auto increment value to 1. There appears to be no tuncate
> > command and the usual alter table command for Mysql is also invalid.
> 
> Are you talking about INTEGER PRIMIARY KEY AUTOINCREMENT field? Run this 
> statement:
> 
> delete from sqlite_sequence where name='YourTableName';
> 
> For more details, see http://sqlite.org/autoinc.html
> -- 
> With best wishes,
> Igor Tandetnik
> 
> With sufficient thrust, pigs fly just fine. However, this is not 
> necessarily a good idea. It is hard to be sure where they are going to 
> land, and it could be dangerous sitting under them as they fly 
> overhead. -- RFC 1925 
> 
> 
> 
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

_
Get Hotmail on your mobile. Text MSN to 63463 now!
http://mobile.uk.msn.com/pc/mail.aspx
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Reset auto increment / truncate

2008-04-04 Thread uk webdev

Hi,

I've searched high and low and I cannot find any information on how to reset an 
auto increment value to 1. There appears to be no tuncate command and the usual 
alter table command for Mysql is also invalid. 

I have read in various places that "delete from" will reset the auto increent 
value although I have found this not to be the case.

Surely this is possible, but how ?

Any help would be greatly appreciated.

Thanks

David

_
Amazing prizes every hour with Live Search Big Snap
http://www.bigsnapsearch.com
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users