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

Code Example 1

DELETE FROM table
WHERE condition;

Code Example 2

public function deletedata(){	

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

	}

Code Example 3

DELETE FROM tablename;

Learn ReactJs, React Native from akashmittal.com