Please enable JavaScript.
Coggle requires JavaScript to display documents.
Data Types
Storage, Differences, Data Storage
1 byte = 8 Bits - Coggle…
-
Differences
Other
Other types - (cursor, timestamp, uniqueidentifier, table)
Large valued objects - (varchar(max), nvarchar(max) 2gb of data)
BIT(N) (boolean) - integer with a value of 0 (false) or 1 (true), can be null - [1byte for every 8bit column]
Large object data types (text, ntext, image, xml)
Binary strings - (Binary, varbinary, image)
Text
Non-Unicode - intl. characters, (Chinese) - use more bytes to store
Unicode character strings - (nchar, ntext, nvarchar)
(char, text) - [n bytes] - fixed length non-unicode string stat type where n defines string length
-
(varchar) - [actual length+2bytes] - variable length non-unicode string data type, indicates actual storage size
Date
(Datetime, Date, Datetime2, DATE, Time, Time With, Timestamp With, Time Zone)** - [8bytes]
(Datetimeoffset) - [10bytes] - date combined with time of day, time zone awareness
-
-
-
Numeric
Approx. data types (p)(s) - # of decimal digits stored, left & right of the decimal point (DOUBLE PRECISION)
Approximate-nmbr type (Float, Real) - Scientific [bytes depends on the value of n]
Exact numeric data types - perform calculations
(INT, tinyint, bigint, decimal, numeric, smallint) (money)
NUMERIC(P,S) - Exact (same as decimal)
Precison P (how many digits the largest number)
Scale value S (digits to the right of the decimal)
-