String sqlstring= "SELECT * from Tb_wf_main where trim (wf_name) = '" + wfname.trim () + "' ";The string in Java can only double quotation marks (JS can be single quotation marks can also be double quotes), above, if the string needs to stitch the
The use of " ' " (single quotation marks): In SQL Server, two " ' " (single quotation marks) in the case of stitching strings, that is, the concatenation of a " ' " single quote string.The correct wording is given in this column: set @sql =
The difference between single quotation marks and double quotes in PHP
In a programming language, both single and double quotes are important, as is the case in the PHP language. Compared to ASP, PHP quotation marks better use, in ASP, to put the
PHP single double quote difference, PHP double quote Difference
in PHP, the definition of a string can use single quotation marks ' ' in English , you can also use double quotes " " in English .
However, you must use the same single or double
1. Defining Strings
In PHP, the definition of a string can use either single quotation marks or double quotes. However, you must use the same single or double quotation marks to define strings, such as: ' Hello ' and ' hello ' are illegal
1. Define String
In PHP, a string can be defined using single quotes or double quotes. However, you must use the same single or double quotes to define the string, such as: ' Hello ' and ' hello ' are illegal string definitions.
When you define
S, single quotes in HTML, double quotes and their escape use (GO) collectionIn the JS in the relevant characters to make judgments or values, or spell HTML to assign value in many cases will use these, but also I have just encountered the problem,
Use INSERT INTO (field1,field2 ...) VALUES (' Val1 ', ' val2 ' ...) , an error occurs if there is a single quotation mark in the value.Processing method: Determine whether the Val1,val2 contains single quotation marks, if the single quotation marks,
In PHP, single and double quotes are not interoperable, the specific difference is as follows:
The fields inside the double quotes are interpreted by the compiler and then exported as HTML code.
' Single quotes inside without explanation, direct
The escape character for C + + is:/The escape character for SQL is: ' (single quote)Example: SELECT * from TBL where uyear= '06 'Notice the single quotation mark on the red background, which represents the escape character, and if we omit it, the
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.