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 6078037
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:47:17+00:00 2026-05-23T10:47:17+00:00

I have been having trouble updating some fields in a mysql database, and I

  • 0

I have been having trouble updating some fields in a mysql database, and I am frustrated that at times mysql refuses to allow me to query unless I wrap fields in slanted quotes rather than single ones. It seems to have no discernible pattern for doing so, could someone explain what is going on here?

This query works with no quotes of any kind (x is primary key)

UPDATE  table SET  x =  1821 WHERE  x =1820

These two querys fail with syntax problems near the o.

UPDATE  table SET  o =  200 WHERE  x =1820

UPDATE  table SET  'o' =  200 WHERE  x =1820

This query works.

UPDATE  table SET  `o` =  200 WHERE  x =1820

Is there any legitimate reason mysql is insistent on using the slanted quotes?

  • 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-23T10:47:18+00:00Added an answer on May 23, 2026 at 10:47 am

    In almost all SQL dialects, strings (like input values) go single quoted and identifiers (like table or column names) go unquoted:

    SELECT column_name, function_name() AS column_alias
    FROM table_name
    WHERE another_column='The value to match'
    

    This is valid for MySQL, Oracle, SQL-Server and a long etcetera.

    This is the general rule. Then, there’s a particular situation: when you want to use certain name for an identifier that would normally be invalid. In such case, MySQL allows you to use backtick quotes around the name (other DBMS use square brackets, double quotes or simply don’t allow you to use such name):

    SELECT `Full Name` -- Name with spaces
    FROM `from` -- Reserved word
    

    In general, it’s better to simply avoid these kind of names, although I understand there are cases where a really good name is already taken:

    SELECT `key`, value
    FROM settings
    

    As about your examples, it’s obvious that they aren’t real queries since using table as a table name would trigger a syntax error in them all 😉

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

Sidebar

Related Questions

Been having trouble with this for some time. I have a database sort of
I have been having trouble searching through a MySQL table, trying to find entries
I have been having trouble with Hibernate and Mysql timeout error for a week.
I have been having some trouble with reminders as of lately. I was wondering
I have been having some trouble reversing my vectors in my game when a
I have been having some trouble figuring out how exactly I get a process's
so I have been having trouble with grabbing information from a device that is
I have been having some trouble getting the following to work: <IfModule mod_rewrite.c> DirectoryIndex
I have been having some trouble to select the rows of my table which
i have been having for SQL trouble, i am using an SQLite database and

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.