0% found this document useful (0 votes)
40 views3 pages

I. Character Data Types

This document discusses the different data types available in SQL Server. It covers character data types like char, varchar, nchar and nvarchar which can be either unicode or non-unicode and fixed-length or variable-length. Exact number data types like int, smallint and bigint store integers, while decimal and numeric store numbers with decimals. Approximate number types like float and real store imprecise values. Date/time data types store dates, times and datetimes. Other types include binary, varbinary, bit for true/false values, and uniqueidentifier for GUIDs.

Uploaded by

Fluffy
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views3 pages

I. Character Data Types

This document discusses the different data types available in SQL Server. It covers character data types like char, varchar, nchar and nvarchar which can be either unicode or non-unicode and fixed-length or variable-length. Exact number data types like int, smallint and bigint store integers, while decimal and numeric store numbers with decimals. Approximate number types like float and real store imprecise values. Date/time data types store dates, times and datetimes. Other types include binary, varbinary, bit for true/false values, and uniqueidentifier for GUIDs.

Uploaded by

Fluffy
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

SQL Server Data Types

I.

Character Data Types:


char nchar varchar nvarchar

Ne punem 2 intrebari: 1. UNICODE (cand avem caractere internationale) sau NON-UNICODE 2. FIXED LENGTH (lungime fixa) sau VARIABLE LENGTH (lungime variabila) UNICODE FIXED-LENGTH sau VARIABLE LENGTH nvarchar varchar nchar sau NON-UNICODE char

Caractere cu lungime fixa (fixed length character data) - nchar(10) - char(10) - 20 bytes, padded with spaces - 10 bytes, padded with spaces

Caractere cu lungime variabila (variable length character data) - nvarchar(10) - nvarchar(4000) - varchar(8000) - it depends, pana la 20 bytes - maximum specified length - maximum specified length

- nvarchar(max)

- pana la 2 GB

II. Exact numbers (numere exacte):


int smallint tinyint bigint money (-2 mlrd ; + 2 mlrd) ( -32.768; + 32.767) ( 0; 255) (+/- 2^63) (+/- 922.337.203.685.477, 5808) Numere cu zecimale Numere intregi

smallmoney (+/- 214.748, 3648) decimal (fixed precision and scale) sau numeric exemplu: decimal (9,2)

valoarea maxima: 9999999.99

III. Approximate numbers:


float(n), real n = numarul aproximativ

IV. Date Data Types:


date time datetime datetime2 datetimeoffset (data si timp international) smalldatetime

V. Other data types:


binary varbinary

bit (true/false) xml uniqueidentifier

You might also like