delete row sql server code example
Example 1: sql server delete row
DELETE FROM my_table WHERE id = 3;
DELETE FROM my_table; -- All rows
DELETE TOP 10 FROM my_table; -- First 10 rows
DELETE TOP 10 PERCENT FROM my_table; -- First 10% of rows
Example 2: delete query
public function deletedata(){
$this->db->where('id', 2);
$this->db->delete('table_name');
}