Javatpoint Logo
Javatpoint Logo

Cassandra DELETE Data

DELETE command is used to delete data from Cassandra table. You can delete the complete table or a selected row by using this command.

Syntax:

Example:

Let's take an example to demonstrate how to delete data from Cassandra table. We have a table named "student" with columns (student_id, student_fees student_name), having the following data.

Cassandra Delete data 1

Delete an entire row

To delete the entire row of the student_id "3", use the following command:

Cassandra Delete data 2

Row having student_id 3 has been deleted. You can verify it by using SELECT command.

Cassandra Delete data 3

Delete a specific column name

Example:

Delete the student_fees where student_id is 4.

Cassandra Delete data 4

It is deleted now. You can verify it:

Cassandra Delete data 5

You can see that it is null now.






Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA