MySQL's anti-quote Backtick

Source: Internet
Author: User
Tags mysql query

In MySQL query statements, when identifiers contain special characters or reserved words, these identifiers need to be enclosed in ('), for example, when querying a data table named Foo#bar, or a field called SELECT, you should write these two identifiers as ' and FOO#BAR` 'SELECT`,因为反引号提供一个额外的安全保护,它在程序生成的sql语句中被广泛运用.

Many other database systems use double quotes ( " ) to enclose special symbols, and to improve portability, you can add Sql_mode values so that you ANSI_QUOTES can enclose special symbols in double quotes.

MySQL's anti-quote Backtick

Related Article

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.