Cassandra DELETE DataDELETE command is used to delete data from Cassandra table. You can delete the complete table or a selected row by using this command.
DELETE FROM <identifier> WHERE <condition>;
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.
Delete an entire rowTo delete the entire row of the student_id "3", use the following command:
DELETE FROM student WHERE student_id=3;
Row having student_id 3 has been deleted. You can verify it by using SELECT command.
Delete a specific column nameExample:
Delete the student_fees where student_id is 4.
DELETE student_fees FROM student WHERE student_id=4;
It is deleted now. You can verify it:
You can see that it is null now.