Problems with quotes in MySQL

Source: Internet
Author: User

Original: http://blog.csdn.net/wisgood/article/details/6317543

A string in MySQL that can be represented either in two single quotes or in two double quotes. For example, string Wangxiaowei, with single quotation marks for ' Wangxiaowei ', and double quotes for "Wangxiaowei"

When single quotation marks are used to denote a string, if single quotation marks appear in the string, two single quotation marks are used to denote a single quotation mark, as in the case of Wang ' Xiaowei, a single quotation mark is used to denote ' Wang ' Xiaowei '. When using double quotation marks to denote a string, if double quotation marks appear in the string, use two double quotation marks to denote a double quotation mark, such as Wang "Xiaowei, with double quotation marks for" Wang "" Xiaowei ".

For the following string, Wang "" Xiao ' Wei (Wang double quotes, double quotes, Xiao Single quotes Wei) can be represented either as single quotes or as double quotation marks.

Single quotes as ' Wang ', ' Xiao ' ' wei '

Explanation: Single quote Wang double quote double quote Xiaowei single quote Wei single quote

Double quotes as "Wang" "" "Xiao ' Wei"

Explanation: Double quotes Wang double quotes double quotes double quotes double quotes Xiaowei single quotes Wei double quotes

Problems with quotes in MySQL

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.