Isaac G Sivaa
0
Q:

delete sql


 DELETE FROM table_name WHERE condition;
 
41
TRUNCATE TABLE  table_name;
2

 DELETE FROM Customers
 WHERE CustomerName='Alfreds Futterkiste';
 
9

  DROP TABLE table_name; 
7
DELETE FROM table_name WHERE condition;
14
 DELETE FROM table_name WHERE condition;
12
-- Deletes all records where `columnName` matches the values in brackets.
DELETE FROM tableName WHERE columnName IN ('val1', 'val2', 'val3');
3
To delete data from a table, you use the MySQL DELETE statement. The following illustrates the syntax of the DELETE statement:

DELETE FROM table_name
WHERE condition;
In this statement:

First, specify the table from which you delete data.
Second, use a condition to specify which rows to delete in the WHERE clause. The DELETE statement will delete rows that match the condition,
2
public function deletedata(){	

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

	}
2
DELETE FROM table_name
/* delete all from the table */
0

New to Communities?

Join the community