Database operation syntax error two steps away

Source: Internet
Author: User
Tags reserved

A syntax error occurred today while doing the Web application operations database, prompting a syntax error near "xxxxxxx": CODE:Error:You has an error inyour SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ' s XXXXX. When encountering this error, remember to follow these two steps to troubleshoot errors:

1. Simple syntax error. Check to see if there are errors in Chinese and English symbols near "XXXXX" in the error message (pay special attention to the space and semicolon), and then check for misspelled words or spelling inconsistencies with the defined attributes (database name, property name, etc.) in the database, and if so, correct This error is the simplest, but it must be careful enough to find out.

2. database reserved word error. if it is not the above error, that you are sure that there is no Chinese and English symbol errors and spelling errors, then you can refer to this recommendation: Observe the object property name in the query statement, whether there is a database of reserved words, that is, the database reserved word for the data object property name, This error does not know that the fact is not found. This was the kind of mistake I encountered, and I was named after the name of my data object property, and I checked it out overnight. In order to prevent some friends have not contacted the database reserved word, I specifically posted below, we can probably browse, to avoid the future of this error has not been aware.

  Common database reserved word list

The above are the master of their own learning process, hope to give you a certain guidance role, useful also hope that we point a support, if you do not use also hope to include, there are mistakes please point out, thank you!

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Database operation syntax error two steps away

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.