Search code examples
mysqldrop-table

SQL DROP query request


I used DROP ecommerce.users; but it shows error #1064. Kindly help.


Solution

  • I think you want to use:

    DROP TABLE `ecommerce`.`users`;
    

    Just DROP by itself is ambiguous. There are several different types of things you can drop in a MySQL database. Tables, indexes, triggers, views, procedures, or even a schema. You have to be specific. The word TABLE is necessary.

    See https://dev.mysql.com/doc/refman/8.0/en/drop-table.html