All datatypes basics in SQL Server 2008R2.

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

    Thanks,
    Shiva N
    Database Consultant

  • 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

  • Ho very thanks, i'll do it now.

    Thanks,
    Shiva N
    Database Consultant

  • 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.

  • 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 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 5 (of 5 total)

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