June 6, 2011

SQL Server Data Types


SQL Server Data Types

Numeric data types: Can be anything from very small to extremely large numbers. Also included are specific formats such as monetary amounts, float point numbers, numbers with a known number of decimal points, whole numbers, and so on.

Date and time data types: Allows the direct input of date and time values. This is usually in a default format, such as mm/dd/yyyy hh:mm, or something similar.
String data types: Can be fixed length strings, variable length strings, or even very large text objects. Text objects may or may not be stored in binary format. Strings normally accept alphanumeric data. Alphanumeric
characters are letters, numbers, and special characters (anything on your keyboard that is not a letter or a number).

Binary data types: Typically used to store large objects, including images, sound files, video, even very large textual values like documents. SQL Server 2005 allows storage of similarly related Microsoft product types, such as directly interpretable storage of Word and Excel documents.

Unicode data types: Unicode data simply allows for a lot more available characters. So, using Unicode standards, you can store characters for other languages such as Chinese and Cyrillic characters.

Other data types: There are a few other very interesting data types used for specific purposes. These include things like cursors, variant data types, XML, and others:
• A cursor is used to programmatically access the results of a SQL
statement (a query).
• A variant (sql_variant) allows you to store any data type, effectively allowing for an unknown data type.
• XML allows direct storage and access as a native XML document. In other words, you can execute standard XML functionality against the stored XML document

No comments:

Post a Comment