从表中删除所有记录
DELETE FROM table_name;
sql从表中删除行
DELETE FROM table_name WHERE condition;
如何删除sql中的行
delete from TableName where condition;
delete from scrumteam where firstname='Jack';
delete from scrumteam where JobTitle='SDET';
如何删除sql中的行
DELETE FROM my_table; -- all rows
DELETE FROM my_table WHERE my_id = 12345;
DELETE FROM my_table WHERE my_id IN (SELECT id2 FROM my_table2);
删除查询
public function deletedata(){
$this->db->where('id', 2);
$this->db->delete('table_name');
}
从sql中删除
delete from table_name where condition;