ScyllaDB University LIVE, FREE Virtual Training Event | March 21
Register for Free
ScyllaDB Documentation Logo Documentation
  • Deployments
    • Cloud
    • Server
  • Tools
    • ScyllaDB Manager
    • ScyllaDB Monitoring Stack
    • ScyllaDB Operator
  • Drivers
    • CQL Drivers
    • DynamoDB Drivers
  • Resources
    • ScyllaDB University
    • Community Forum
    • Tutorials
Install
Ask AI
ScyllaDB Docs ScyllaDB Documentation Get Started with ScyllaDB Query Data Deleting Data

Deleting Data¶

Delete data with the DELETE statement. Be specific with your restrictions to avoid accidental deletions. For example:

DELETE FROM my_keyspace.users
  WHERE user_id = 123e4567-e89b-12d3-a456-426655440000;

Let’s break down the components of this DELETE statement:

Keyspace and Table

my_keyspace.users: This specifies the keyspace and table from which you want to delete data. In this example, you are deleting data from a table named my_table within the my_keyspace keyspace.

WHERE Clause WHERE user_id = 123e4567-e89b-12d3-a456-426655440000: This part of the statement specifies a restriction for filtering the rows to be deleted.

Including the WHERE clause with a specific restriction is essential to ensure that only the rows meeting the restriction will be deleted. This is done to prevent accidental deletions of the wrong data in the table.

Note

Similar to INSERT and UPDATE statements, a DELETE operation can be conditional using ScyllaDB’s Lightweight Transaction IF EXISTS` clause.

In summary, the DELETE statement in ScyllaDB is used to remove existing data from a table. Always use a WHERE clause with a suitable restriction to target the specific rows you want to delete, and ensure that the restriction is specific enough to avoid unintended data loss. This approach helps maintain data integrity in your ScyllaDB tables.

See the details about the DELETE statement in the ScyllaDB documentation.

Was this page helpful?

PREVIOUS
Updating Data
NEXT
Data Modeling
  • Create an issue
  • Edit this page
ScyllaDB Documentation
  • Get Started with ScyllaDB
    • Why ScyllaDB?
    • Develop with ScyllaDB
      • Run ScyllaDB
      • Install a Driver
      • Connect an Application
      • Tutorials and Example Projects
    • Query Data
      • CQL
      • Schema
      • Inserting Data
      • Reading Data
      • Updating Data
      • Deleting Data
    • Data Modeling
      • Query Design
      • Schema Design
      • Data Modeling Best Practices
    • Learn to Use ScyllaDB
  • Versioning and Support Policy
    • ScyllaDB Version Support
    • Driver Support Policy
Docs Tutorials University Contact Us About Us
© 2025, ScyllaDB. All rights reserved. | Terms of Service | Privacy Policy | ScyllaDB, and ScyllaDB Cloud, are registered trademarks of ScyllaDB, Inc.
Last updated on 16 Sep 2025.
Powered by Sphinx 7.4.7 & ScyllaDB Theme 1.8.8
Ask AI