Mysql | How to drop table having dot (.) in the table name in MySQL

Author - Rita

We had a table in our database having dot in the table name as below:

Table name – kpc.product_categories

On trying to delete kpc.product_categories using below command:

drop table kpc.product_categories

It used to give error that no such table exists.

Dot(.) is the reserved symbol in mysql so we have to avoid (.) as much as possible. But if unfortunately, we had such a table name use below sql command to drop it:

Sql Queries:

  1. SET sql_mode=’ANSI_QUOTES’;
  2. USE DATABASE  “database_name” ;
  3. DROP TABLE  “kpc.product_categories” ;

DROP TABLE kpc.product_categories 

Webner Solutions is a Software Development company focused on developing Insurance Agency Management Systems, Learning Management Systems and Salesforce apps. Contact us at for your Insurance, eLearning and Salesforce applications.

Leave a Reply

Your email address will not be published.