Loading…

How to truncate table with query in Codelgniter?

// TRUNCATE table admin;
You can use this to truncate table
$this->db->from('admin'); // select admin table
$this->db->truncate(); // truncate admin table

OR

You can also use like this
$this->db->truncate('admin'); // truncate admin table

Suggest An Answer

No suggestions avaliable!

Latest post from CodeIgniter Interview Questions

Ask Question