how to empty a table (postgres)
What's the best way to programatically empty a database table?
I'm using
in the meantime
Thank you
3 Replies
looks pretty good to me
one thing to improve is using the table as a parameter to reference its name:
ah, actually, you could just use the query builder syntax 😅
I got confused for a second
oh, that’s even better 🙂
gonna try it when i get home
just to confirm:
‘db.delete’ removes the rows from the table, it doesn’t drop it right?
yup
that's why it's called
delete
and not drop
🙂