Welcome to Sign in | Help

Re: Data Types in SQL Server 2005

  •  10-03-2006, 9:59 PM

    Re: Data Types in SQL Server 2005

    Sa le luam pe rand! Pe masura ce le explicam le voi sublinia pentru a fi evidente cele ramase.

    Numerele intregi pot fi:

    Tip de data  Interval Stocare

    bigint

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

    8 Bytes

    int

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

    4 Bytes

    smallint

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

    2 Bytes

    tinyint

    0 to 255

    1 Byte

     

    bit este un tip mai special de numar intreg, si poate lua urmatoarele valori: 1, 0, sau NULL. Stocarea coloanelor de tip bit este optimizata - in cazul existentei intr-un tabel a 8 sau mai putin de 8 coloane avand tipul bit, coloanele sunt stocate pe un byte (octet). Intre 9 si 16 coloane de tip bit vor fi ocupati 2 octeti si tot asa. Sirurile de caractere TRUE si FALSE pot fi convertite la tipul bit dupa cum urmeaza: TRUE este convertit la valoarea 1 iar FALSE la valoarea 0.


    Cristian Andrei Lefter, SQL Server MVP
    MCT, MCSA, MCDBA, MCAD, MCSD .NET,
    MCTS, MCITP - Database Administrator SQL Server 2005
    http://sqlserver.ro
View Complete Thread
Powered by Community Server (Commercial Edition), by Telligent Systems