当前位置:Gxlcms > 数据库问题 > SQL Server 2008 R2——Data Types

SQL Server 2008 R2——Data Types

时间:2021-07-01 10:21:17 帮助过:2人阅读

  • The precision, scale, and length of the result depend on the precision, scale, and length of the input expressions. For more information, see Precision, Scale, and Length (Transact-SQL).

  • SQL Server provides data type synonyms for ISO compatibility. For more information, see Data Type Synonyms (Transact-SQL).

    Data Type Categories

     

    Data types in SQL Server are organized into the following categories:

     

    Exact numerics

    Unicode character strings

    Approximate numerics

    Binary strings

    Date and time

    Other data types

    Character strings

     

    In SQL Server, based on their storage characteristics, some data types are designated as belonging to the following groups:

    • Large value data types: varchar(max), nvarchar(max), and varbinary(max)

    • Large object data types: text, ntext, image, varchar(max), nvarchar(max), varbinary(max), and xml

      技术分享Note

      sp_help returns -1 as the length for the large-value and xml data types.

    Exact Numerics

     

    bigint

    numeric

    bit

    smallint

    decimal

    smallmoney

    int

    tinyint

    money

     

    Approximate Numerics

     

    float

    real

    Date and Time

     

    date

    datetimeoffset

    datetime2

    smalldatetime

    datetime

    time

    Character Strings

     

    char

    varchar

    text

     

    Unicode Character Strings

     

    nchar

    nvarchar

    ntext

     

    Binary Strings

     

    binary

    varbinary

    image

     

    Other Data Types

     

    cursor

    timestamp

    hierarchyid

    uniqueidentifier

    sql_variant

    xml

    table

     
       

    SQL Server 2008 R2——Data Types

    标签:

    人气教程排行