SQL Server Database Statement inquiry

Source: Internet
Author: User
Tags cdata xml parser

1 between A and B Value pack does not contain a B

CREATE TABLE TEST (ID INT IDENTITY (PRIMARY) key,num int NULL)
INSERT into TEST (NUM) VALUES (1), (2), (3), (4);

Query with between and after building the above table

SELECT *where14

Get results

So between A and b contain both A and B

2 SSM Integration in <! [What is cdata[>=]]>?

CDATA The full name is character data, which refers to text that is parsed without using an XML parser. Under Mark CDATA,

All keyword strings that conflict with the XML specification are treated equally as character data by an XML handler, CDATA in the following form:

1, <! [cdata[text content]]>

2, where the text content can not appear in the string "]]>", in addition CDATA can not be nested

The term CDATA refers to textual data (unparsed Character data) that should not be parsed by the XML parser.

In XML elements, "<" and "&" are illegal.

"<" generates an error because the parser interprets the character as the beginning of the new element.

"&" also generates an error because the parser interprets the character as the beginning of the character entity.

Some text, such as JavaScript code, contains a large number of "<" or "&" characters. To avoid errors, you can define the script code as CDATA.

All content in the CDATA section is ignored by the parser.

CDATA part by "<! [cdata[] begins with the end of "]]>":

Comments about the CDATA section:

CDATA sections cannot contain the string "]]>". Also, nested CDATA sections are not allowed.

"]]>" that marks the end of a CDATA section cannot contain spaces or lines.

3 five pre-defined entity references in XML

5 a predefined entity reference:&lt;    <     less than &gt;    >     greater than &amp;    &     and number &apos;    '     ellipsis &quot;    " The     quotation marks "< " and "& " are illegal. ellipses, quotes, and greater-than numbers are legal, but it's a good practice to replace them with entity references.

SQL Server Database Statement inquiry

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.