How do I TRUNCATE TABLE using Django orm?

Posted by Silver Light on Stack Overflow See other posts from Stack Overflow or by Silver Light
Published on 2010-06-07T11:24:56Z Indexed on 2010/06/07 11:52 UTC
Read the original article Hit count: 150

Filed under:
|
|

Hello!

To empty database table, I use this SQL Query:

TRUNCATE TABLE `books`

How to I Truncate table using Django models and orm?

I've tried this, but it doesn't work:

Book.objects.truncate()

© Stack Overflow or respective owner

Related posts about python

Related posts about sql