What is the significance of the backslash in MYSQL syntax?

Source: Internet
Author: User
SELECTfunction_baseurl.idASidFROMfunction_baseurlWHERETRUE: the code of a colleague added a backslash to all the fields, making the code very ugly. what is the significance of this operation? SELECT Function_baseurl. IdAS IdFROM Function_baseurlWHERE TRUE

The previous sentence was a colleague's code. he added a backslash to all the fields, which made the code very ugly. does this mean anything?

Reply content:

SELECTFunction_baseurl.IdASIdFROMFunction_baseurlWHERE TRUE

The previous sentence was a colleague's code. he added a backslash to all the fields, which made the code very ugly. does this mean anything?

I personally think this is telling the compiler to wrap it! It doesn't make much sense. Personal opinions are for reference only

Is it 'or \

'Is the mysql escape character. as long as you do not use mysql reserved words or Chinese characters in the column name or table name, you do not need to escape other databases and also have reserved words. if you use them, you also need to escape them, only the escape characters are different.
\ Is the escape of field input content to ensure that the data will not cause the program, especially the database statements may cause fatal errors due to pollution caused by special characters. In the case of magic_quotes_gpc = On, if the input data contains single quotation marks ('), double quotation marks ("), backslash (), and NUL (NULL characters) and other characters will be added with a backslash. These escape characters are required.
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.