DELETE FROM table_name WHERE condition;
DELETE FROM Customers WHERE CustomerName='Alfreds Futterkiste';
DELETE FROM table_name;
-- Deletes all records where `columnName` matches the values in brackets. DELETE FROM tableName WHERE columnName IN ('val1', 'val2', 'val3');
UPDATE TableName SET ColumnName = NULL
public function deletedata(){ $this->db->where('id', 2); $this->db->delete('table_name'); }