CHAPTER 13

image

Managing Tables

by Wayne Sheffield

Almost all databases have one thing in common: they use tables to store data. In this chapter, I’ll present recipes that demonstrate table creation and manipulation. Tables are used to store data in the database and are the central unit upon which most SQL Server database objects depend. Tables are uniquely named within a database and schema and contain one or more columns. Each column has an associated data type that defines the kind of data that can be stored within it.

A table can have up to 1,024 columns (with the exception of sparse columns) but can’t exceed a total of 8,060 actual used bytes ...

Get SQL Server T-SQL Recipes, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.