ลบทุกบันทึกจากโต๊ะ
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);
ลบ query
public function deletedata(){
$this->db->where('id', 2);
$this->db->delete('table_name');
}
ลบจากภาษา sql
delete from table_name where condition;