Check out example codes for "delete sql". It will help you in understanding the concepts better.

Code Example 1

DELETE FROM table_name WHERE condition;

Code Example 2

-- Deletes all records where `columnName` matches the values in brackets.
DELETE FROM tableName WHERE columnName IN ('val1', 'val2', 'val3');

Code Example 3

DELETE FROM Customers
 WHERE CustomerName='Alfreds Futterkiste';

Code Example 4

DELETE FROM table_name
/* delete all from the table */

Code Example 5

DELETE FROM table_name WHERE condition;

Code Example 6

public function deletedata(){	

	$this->db->where('id', 2);	
	$this->db->delete('table_name');

	}

Learn ReactJs, React Native from akashmittal.com