Wednesday, February 15, 2012

empty a table

hi everyone,
i was just wondering, is there anyway to empty a table...like, in mysql u can go EMPTY TABLE
and it resets the identity stuff, so your id's start at zero again...?
Thanks, JustinYou can use one of the following statements:

DELETE FROM YourTable

TRUNCATE TABLE YourTable|||DELETE will not reset the Identity value.
TRUNCATE will.|||...like, in mysql u can go EMPTY TABLE no you can't

but thankfully, TRUNCATE TABLE works in mysql too

:)|||no you can't

but thankfully, TRUNCATE TABLE works in mysql too

:)

hi, well, havent used mysql in a little while..

maybe it was known as empty table in 3.x and 4.x versions of mysql...if not, then im not sure where i got it from...or maybe that just what phpmyadmin called it.

but thats for the replies,

Cheers, Justin

No comments:

Post a Comment