Data Types
Transact-SQL provides 27 different data types, which basically control the data that you can store in columns, variables, parameters, and expressions.
SQL Server 2000 introduced three new data types: BIGINT, TABLE, and SQL_VARIANT. BIGINT uses 8 bytes to store integers, which is 4 bytes more than the INT data type, which uses only 4 bytes of storage size. The TABLE data type behaves like a table, storing sets of rows. Be aware that the TABLE data type cannot be used by columns in tables. And finally, the SQL_VARIANT data type allows you to store almost any value (integer, character, numeric, and so on), except TEXT, NTEXT, IMAGE, TIMESTAMP, and SQL_VARIANT values. The SQL_VARIANT data type is similar to the variant data type in Visual ...
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