What is the fastest way to empty a table


I have read this interview question

I think the answer is truncate table.

Kindly suggest
Who is Participating?
Guy Hengel [angelIII / a3]Connect With a Mentor Billing EngineerCommented:
yes. however, with foreign keys pointing to that table, it would not work.
another "fast" way is to drop the table, but you will need again to first drop the foreign keys pointing to the table and recreate them afterwards.
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.