All datatypes basics in SQL Server 2008R2.

  • Shiva N

    Hall of Fame

    Points: 3125

    Comments posted to this topic are about the item All datatypes basics in SQL Server 2008R2.

    Thanks,
    Shiva N
    Database Consultant

  • Vimal Lohani

    SSCommitted

    Points: 1650

    Hi Shiva,

    Great job,

    still i find one column empty.

    you may use either ,[Uniqueidentifier10] UNIQUEIDENTIFIER Default NEWID() at create table statement or INSERT INTO tblWithAllDatatypes (bit1,Uniqueidentifier10)

    select null,NEWID();

    Vimal LohaniSQL DBA | MCP (70-461,70-462)==============================The greatest barrier to success is the fear of failure ** Success is a journey not a destination**Think before you print, SAVE TREES, Protect Mother Nature

  • Shiva N

    Hall of Fame

    Points: 3125

    Ho very thanks, i'll do it now.

    Thanks,
    Shiva N
    Database Consultant

  • Alan Knepper

    SSC Journeyman

    Points: 96

    According to SQL Server Help these are the ranges:

    BIGINT: -2^63 (-9,223,372,036,854,775,808) to 2^63-1 (9,223,372,036,854,775,807)

    INT: -2^31 (-2,147,483,648) to 2^31-1 (2,147,483,647)

    SMALLINT: -2^15 (-32,768) to 2^15-1 (32,767)

    For each of these data types you were off by one on the low side of the range.

  • thewoodymax

    SSC Enthusiast

    Points: 148

    Shiva,

    Why are there Chinese characters for the following data types and what do they mean?

    ,[Nchar22] NCHAR(10) DEFAULT('????')

    ,[Nvarchar23] NVARCHAR(10) DEFAULT('?????')

    ,[Ntext24] NTEXT DEFAULT('????')

    Jeff

  • Vimal Lohani

    SSCommitted

    Points: 1650

    Jeff Torres (10/12/2014)


    Shiva,

    Why are there Chinese characters for the following data types and what do they mean?

    ,[Nchar22] NCHAR(10) DEFAULT('????')

    ,[Nvarchar23] NVARCHAR(10) DEFAULT('?????')

    ,[Ntext24] NTEXT DEFAULT('????')

    Jeff

    Jeff varchar follow non Unicode characters while nvarchar follow unicode characters.

    Vimal LohaniSQL DBA | MCP (70-461,70-462)==============================The greatest barrier to success is the fear of failure ** Success is a journey not a destination**Think before you print, SAVE TREES, Protect Mother Nature

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply