QuestDB
EnterpriseCustomersDocsBlog
8.3.1
  • Roadmap
Download
  • Introduction
  • Quick start
  • Why QuestDB?
  • Schema Design Essentials
  • Migrate from InfluxDB
  • Ingestion Reference
  • Query & SQL Reference
    • Query & SQL Overview
    • PGWire Clients
      • Overview
      • Python
      • Go
      • Java
      • Rust
      • Node.js
      • .NET
      • PHP
      • R
    • Data types
    • SQL execution order
    • SQL Syntax
      • ADD USER
      • ALTER
      • ASSUME SERVICE ACCOUNT
      • CANCEL QUERY
      • CHECKPOINT
      • COPY
      • CREATE
      • DROP
      • EXPLAIN
      • EXIT SERVICE ACCOUNT
      • GRANT
      • INSERT
      • REFRESH MATERIALIZED VIEW
      • REINDEX
      • RENAME TABLE
      • REMOVE USER
      • REVOKE
      • SELECT
      • SHOW
      • SNAPSHOT
      • TRUNCATE TABLE
      • UNION EXCEPT INTERSECT
      • UPDATE
      • VACUUM TABLE
    • Functions
    • Operators
  • Deployment
  • Operations
  • Guides & Tutorials
  • Concepts
  • Third-party Tools
  • Troubleshooting
  • Query & SQL Reference
  • SQL Syntax
  • TRUNCATE TABLE

TRUNCATE TABLE keyword

TRUNCATE TABLE permanently deletes the contents of a table without deleting the table itself.

Syntax​

Flow chart showing the syntax of the TRUNCATE TABLE keyword

Notes​

This command irremediably deletes the data in the target table. In doubt, make sure you have created backups of your data.

Examples​

TRUNCATE TABLE ratings;

See also​

To delete both the data and the table structure, use DROP.

Edit this page
Previous
SNAPSHOT
Next
UNION EXCEPT INTERSECT
  • Syntax
  • Notes
  • Examples
  • See also

Need a hand? Join our vibrant public Slack and Discourse forum communities.

Copyright © 2025 QuestDB
PrivacyTerms