Skip to main content

api.truncateDatabase()

Removes all rows from a logical database selected by name. Notes:
  • Unavailable with readOnly: true (throws an error).
  • TRUNCATE does not create row audit events, even when database audit is enabled.
  • Use an ordinary filtered delete, such as primary key IS NOT NULL, to preserve row audit events.
  • Identity counters are preserved by default.
  • Set restartIdentity only when generated key reuse is explicitly intended.

Signature

Example

See all api methods or runtime basics.
Last modified on November 8, 2026