Column Characteristics

When a column is added to a database table, you set several parameters that define the characteristics of that column. These include the name of the column, its data type, its length, and a default value. In this section, you will learn all about data types, what they are and how you should use them. In addition, you will see how empty or null columns are treated by the SQL processor.

Data Types

In a database, every column, variable, expression, and parameter has a related data type associated with it. A data type is an attribute that specifies the type of data (integer, string, date, and so on) that object can contain. All the data that a specific column holds must be of the same data type. A data type also determines how ...

Get Sams Teach Yourself Transact-SQL in 21 Days, Second 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.