Microsoft SQL Server 2008/2012 Internals A question

Source: Internet
Author: User
Tags sql server express

Kalen Delaney's deep analysis of the Microsoft SQL Server family, the prestigious, in-depth study, is a glimpse into the complexities of SQL Server ladder and path. Have at hand Microsoft SQL Server InternalsPhotocopy version, there are also Microsoft SQL Server InternalsElectronic version, cross-reference, supplemented by practical exercises, benefited. But there is one place that is in contrast to the actual walkthrough. Microsoft SQL Server 2008/2012 Internals has this paragraph on page 272: This text, version 2008 and version 2012 is exactly the same. The text says that if you insert a full blank row into the table (except for the primary key, the nullable varchar fields are all null): INSERT INTO Nullvarchar (Col1,col2,col3,col4,col5,col6,col7,col8, COL9,COL10) VALUES (null,null,null,null,null,null,null,null,null,null); The actual storage in the data table exported through the DBCC PAGE command, whose NULL bitmap field is all zeros. The actual export results are as follows (SQL Server Express): Where the value of the NULL bitmap field is 0xfe07, which is actually equal to 0x07fe = 0000011111111110. The meaning of this value is: Except for the first field (the primary key field ID) is not empty, the remaining 10 fields are all empty. The Status Bits A = 0x10 = 00010000, where bit 4 = 1, indicates that the record contains a NULL bitmap field. Bit 5 = 0 indicates that there are no variable-length fields in the record, that is, because all variable-length fields are empty, SQL Server simply does not store the fields. Kalen Delaney's book in Microsoft SQL Server 2008/2012 Internals, why is the NULL bitmap domain all zeros?

Microsoft SQL Server 2008/2012 Internals A question

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.