使用 ActiveJDBC 截断 table
Truncate table with ActiveJDBC
用 ActiveJDBC 运行分类 table 的最佳方法是什么?模型 class 只有 deleteAll().
所以我想我需要 运行 原生 SQL 查询,Base.exec("TRUNCATE TABLE table1")
是可行的方法吗?
谢谢。
是的,如果你想执行任意SQL,使用Base.exec(sql).
用 ActiveJDBC 运行分类 table 的最佳方法是什么?模型 class 只有 deleteAll().
所以我想我需要 运行 原生 SQL 查询,Base.exec("TRUNCATE TABLE table1")
是可行的方法吗?
谢谢。
是的,如果你想执行任意SQL,使用Base.exec(sql).