Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7582853
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T18:32:18+00:00 2026-05-30T18:32:18+00:00

Mysql mistake (don’t laught please) I made a script that generates statistics table for

  • 0

Mysql mistake (don’t laught please)

I made a script that generates statistics table for my site. This script generates over 2000 tables that are used for different statistics data with a different granularity like:

  • tables by years
  • tables by day
  • tables by users
  • tables by user_agent

etc… (don’t ask me why this, it was made by the previous so called architect – altought they load in less than 0.02 seconds)

So I updated the script to add new tables but i made a mistake.

I put a space in the table name and now I cannot delete it. so i try to put a \ to escape it but no success:

root@summary:reports> drop table xd_2012_02_\ ua;
ERROR: 
Unknown command '\ '.
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\ ua' at line 1
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T18:32:19+00:00Added an answer on May 30, 2026 at 6:32 pm

    You have to use the ` – This will treat the string passed as the actual table name and not a bunch of commands you want to execute.

    root@summary:reports> drop table `xd_2012_02_\ ua`;
    

    This should show:

    Query OK, 0 rows affected (0.00 sec)
    

    I would recommend to use the ` not only for this case, but also that will prevent errors if you use reserved MySQL words like type or desc (as description) for columns or table names. This might save you headaches later. Although, using reserved or special characters is not a good practice, but that’s just me.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I created a table Place in mysql. In this table there are three fields.
i have some php script and i think this have a lot of mistake.
When we add a new table, we made a mistake : a field was
MySQL has this incredibly useful yet proprietary REPLACE INTO SQL Command. Can this easily
MySQL specifies the row format of a table as either fixed or dynamic, depending
MySQL 5.0.45 What is the syntax to alter a table to allow a column
mysql> select count(*) from table where relation_title='xxxxxxxxx'; +----------+ | count(*) | +----------+ | 1291958
I am having a problem with a MySQL query. When ever I run this
EDIT: I've learnt, and it's probably true that YouTube uses MySQL. But it probably
I recently started with MySql, so i might be doing a begginers mistake. Any

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.