Skip to Content
SQL in a Nutshell, 3rd Edition
book

SQL in a Nutshell, 3rd Edition

by Kevin Kline
November 2008
Intermediate to advanced
591 pages
17h 28m
English
O'Reilly Media, Inc.
Content preview from SQL in a Nutshell, 3rd Edition

SQL Server Datatypes

Microsoft SQL Server supports most SQL2003 datatypes, as well as some additional datatypes used to uniquely identify rows of data within a table and across multiple servers, such as UNIQUEIDENTIFIER. These datatypes are included in support of Microsoft’s hardware philosophy of “scale-out” (that is, deploying on many Intel-based servers) rather than “scale-up” (deploying on a single huge, high-end Unix server or a Windows Data Center Server).

Tip

Here’s an interesting side note about SQL Server dates: SQL Server supports dates starting at the year 1753, and you can’t store dates prior to that year using any of SQL Server’s date datatypes. Why not? The rationale is that the English-speaking world started using the Gregorian calendar in 1753 (the Julian calendar was used prior to September, 1753), and converting dates prior to Julian to the Gregorian calendar can be quite challenging.

The datatypes SQL Server supports are:

BIGINT (SQL2003 datatype: BIGINT)

Stores signed and unsigned integers in the range of −9,223,372,036,854,775,808 to 9,223,372,036,854,775,807, using 8 bytes of storage space. See INT for IDENTITY property rules that also apply to BIGINT.

BINARY[(n)] (SQL2003 datatype: BLOB)

Stores a fixed-length binary value of 1 to 8,000 bytes in size. BINARY datatypes consume n + 4 bytes of storage space.

BIT (SQL2003 datatype: BOOLEAN)

Stores a value of 1, 0, or NULL (to indicate “unknown”). Up to eight BIT columns on a single table will be stored in a single byte. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

SQL in a Nutshell, 4th Edition

SQL in a Nutshell, 4th Edition

Kevin Kline, Regina O. Obe, Leo S. Hsu
Learning PostgreSQL 11 - Third Edition

Learning PostgreSQL 11 - Third Edition

Christopher Travers, Andrey Volkov

Publisher Resources

ISBN: 9780596155322Errata Page