Deleting values from a column or entire row

Use the DELETE command to replace the value in a column with null or to remove an entire row of data.

CQL provides the DELETE command to delete a column or row. Deleted values are removed completely by the first compaction following deletion.


  1. Delete the values of the column lastname from the table cyclist_name.
    DELETE lastname FROM cycling.cyclist_name WHERE id = c7fceba0-c141-4207-9494-a29f9809de6f;
  2. Delete entire row for a particular race from the table calendar.
    DELETE FROM cycling.calendar WHERE race_id = 200;
    You can also define a Time To Live value for an individual column or an entire table. This property causes the database to delete the data automatically after a certain amount of time has elapsed. For details, see Expiring data with Time-To-Live.