truncate in sqlite

how can I truncate a table in sqlite? I tried DELETE FROM table; but it doesnt reset the auto incremental ID. any idea?
dinko1Asked:
Who is Participating?
 
dinko1Connect With a Mentor Author Commented:
it says DBCC syntax error. It doesnt understand command.
Anyway I fixed my problem with the line:

DELETE FROM SQLITE_SEQUENCE WHERE NAME = 'tablename'
0
 
8ubterfug3Commented:
The following resets the ID in SQL. Not positive about SQLLite. You could do

DELETE FROM tablename
DBCC CHECKIDENT('tablename', RESEED,0)

Open in new window

0
 
dinko1Author Commented:
i fiound solution on my own
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.