skip to Main Content

I am getting this error.

enter image description here

My client said there is no option to give me those privileges. It’s a very restricted cPanel or something.

So I need to find a way to empty the table, and also reset the incremental values, etc without having DROP command privilege. Any suggestions?

2

Answers


  1. I am not here to talk security .. But if you simply wanted to “clear” the table.. You can use DELETE with a CONDITIONAL .. IE

    DELETE FROM table_name WHERE id > 0;
    

    The trouble with this is if you had IDs 1 – 300 in the database .. Without TRUNCATING the IDs will start from 301 and on —

    Login or Signup to reply.
  2. Without dropping and recreating the table, there is no way to reset the auto increment to start over again at 1, or at any value you’ve already used.

    If you have DELETE privileges, you could empty the table by doing a DELETE FROM, but the auto increment won’t reset as long as the table exists.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search