PHP ZCE mock test, interview preparation, daily lessons under chalk talk

Wednesday, February 1, 2012

Delete the content without resetting the auto increment?

Which of the following command will delete the entire contents of a table without resetting the auto increment value?

a) drop table <tablename>
b) delete from <tablename>
c) truncate table <tablename>
d) remove table <tablename>



I think the answer should be
b) delete from <tablename>

because truncate resets the auto increment id value to 1.
Please share if your answer differs...

No comments:

Post a Comment