SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-12-12 : 04:11:08
|
quote: int, bigint, smallint, and tinyintExact number data types that use integer data.bigintInteger (whole number) data from -2^63 (-9223372036854775808) through 2^63-1 (9223372036854775807). Storage size is 8 bytes.intInteger (whole number) data from -2^31 (-2,147,483,648) through 2^31 - 1 (2,147,483,647). Storage size is 4 bytes. The SQL-92 synonym for int is integer.smallintInteger data from -2^15 (-32,768) through 2^15 - 1 (32,767). Storage size is 2 bytes.tinyintInteger data from 0 through 255. Storage size is 1 byte.
quote: decimal and numericNumeric data types with fixed precision and scale.decimal[(p[, s])] and numeric[(p[, s])]Fixed precision and scale numbers. When maximum precision is used, valid values are from - 10^38 +1 through 10^38 - 1. The SQL-92 synonyms for decimal are dec and dec(p, s).p (precision)Specifies the maximum total number of decimal digits that can be stored, both to the left and to the right of the decimal point. The precision must be a value from 1 through the maximum precision. The maximum precision is 38.s (scale)Specifies the maximum number of decimal digits that can be stored to the right of the decimal point. Scale must be a value from 0 through p. The default scale is 0; therefore, 0 <= s <= p. Maximum storage sizes vary, based on the precision.Precision Storage bytes 1 - 9 5 10-19 9 20-28 13 29-38 17
quote: bitInteger data type 1, 0, or NULL.RemarksColumns of type bit cannot have indexes on them. Microsoft® SQL Server™ optimizes the storage used for bit columns. If there are 8 or fewer bit columns in a table, the columns are stored as 1 byte. If there are from 9 through 16 bit columns, they are stored as 2 bytes, and so on.
quote: money and smallmoneyMonetary data types for representing monetary or currency values.moneyMonetary data values from -2^63 (-922,337,203,685,477.5808) through2^63 - 1 (+922,337,203,685,477.5807), with accuracy to a ten-thousandth of a monetary unit. Storage size is 8 bytes.smallmoneyMonetary data values from - 214,748.3648 through +214,748.3647, with accuracy to a ten-thousandth of a monetary unit. Storage size is 4 bytes.
quote: float and realApproximate number data types for use with floating point numeric data. Floating point data is approximate; not all values in the data type range can be precisely represented.Syntaxfloat [ ( n ) ]Is a floating point number data from - 1.79E + 308 through 1.79E + 308. n is the number of bits used to store the mantissa of the float number in scientific notation and thus dictates the precision and storage size. n must be a value from 1 through 53.n is Precision Storage size 1-24 7 digits 4 bytes 25-53 15 digits 8 bytes The Microsoft® SQL Server™ float[(n)] data type conforms to the SQL-92 standard for all values of n from 1 to 53. The synonym for double precision is float(53).realFloating point number data from –3.40E + 38 through 3.40E + 38. Storage size is 4 bytes. In SQL Server, the synonym for real is float(24).
quote: datetime and smalldatetimeDate and time data types for representing date and time of day. datetimeDate and time data from January 1, 1753 through December 31, 9999, to an accuracy of one three-hundredth of a second (equivalent to 3.33 milliseconds or 0.00333 seconds). Values are rounded to increments of .000, .003, or .007 seconds, as shown in the table.Example Rounded example 01/01/98 23:59:59.999 1998-01-02 00:00:00.000 01/01/98 23:59:59.995,01/01/98 23:59:59.996, 01/01/98 23:59:59.997, or01/01/98 23:59:59.998 1998-01-01 23:59:59.997 01/01/98 23:59:59.992, 01/01/98 23:59:59.993, 01/01/98 23:59:59.994 1998-01-01 23:59:59.993 01/01/98 23:59:59.990 or01/01/98 23:59:59.991 1998-01-01 23:59:59.990 Microsoft® SQL Server™ rejects all values it cannot recognize as dates between 1753 and 9999.smalldatetimeDate and time data from January 1, 1900, through June 6, 2079, with accuracy to the minute. smalldatetime values with 29.998 seconds or lower are rounded down to the nearest minute; values with 29.999 seconds or higher are rounded up to the nearest minute.
Peter LarssonHelsingborg, Sweden |
|
|