Hi Puneet Kishor ,
Yes, you are right. I have to check out whether "DELETE FROM table;" will
really set the auto imcrement primary key seed back zero.
From: Puneet Kishor <[EMAIL PROTECTED]>
Subject: Re: [sqlite] How to truncate table?
Date: Wed, 20 Jul 2005 00:29:27 -0500
On Jul 19, 2005, at 11:50 PM, chan wilson wrote:
In MS SQL, there is a "TRUNCATE TABLE" SQL that will remove all
the records of a table and make the identity back to zero.
Is there any means to accomplish it in sqlite?
DELETE FROM table;
I am assuming, by 'identity' you refer to the auto-incrementing
primary key. If so, yes, SQLite will do the same thing.
Fwiw, I believe TRUNCATE TABLE does a bit more than what you are
implying above. It also truncates the logs and whatnot. But, that
may be neither here nor there.
与世界各地的朋友进行交流，免费下载 MSN Messenger: