# TRUNCATE TABLE Removes all rows in a base table. ``` ::= TRUNCATE TABLE [ ] [ ] ``` ### API ``` +$ truncate-table $: %truncate-table table=qualified-object as-of=(unit as-of) == ``` ### Arguments **`
`** The target table. **``** Timestamp of table creation. Defaults to `NOW` (current time). When specified, the timestamp must be greater than both the latest database schema and content timestamps. ### Remarks The command potentially mutates `
`, resulting in a state change of the Obelisk agent. Tables in the *sys* namespace cannot be truncated. ### Produced Metadata Row count (when table was populated) Content timestamp ### Exceptions state change after query in script database `` does not exist namespace %ns1 does not exist `
` as-of data time out of order `
` as-of schema time out of order table `
` does not exist in `` `GRANT` permission on `
` violated