0

What is the best way to truncate a table with ActiveJDBC? The Model class only has deleteAll().
So I guess I need to run a native SQL query, is Base.exec("TRUNCATE TABLE table1") the way to go?

Thanks.

Maxime Laval
  • 4,068
  • 8
  • 40
  • 60

1 Answers1

1

Yes, if you want to execute arbitrary SQL, use Base.exec(sql).

ipolevoy
  • 5,432
  • 2
  • 31
  • 46