88 Part I EXAM PREPARATION TABLE 2.2 DECIMAL

88 Part I EXAM PREPARATION TABLE 2.2 DECIMAL AND NUMERIC STORAGE SIZES Precision Bytes 1 9 5 10 19 9 20 28 13 29 38 17 Two data types are used for storage of monetary values: smallmoney and money. These values are stored with a scale of four decimal places. The smallmoney data type consumes 4 bytes and allows for the storage of monetary values from 214,748.3648 through +214,748.3647, and the money data type, at 8 bytes, stores values from 922,337,203,685,477.5808 through +922,337,203,685,477.5807. Character Data Types Character data types are subdivided into two categories depending on the byte size of the characters being stored. Traditionally, character data consumed one byte per character, allowing for 255 different characters. This standard was found to be inflexible, so the Unicode standard was developed, in which each character uses two bytes of storage. This standard allows for approximately 64,000 different characters. Each of these two data types have three variations for the storage of data: fixed-length, variable-length, and large character data. Non- Unicode data uses the char, varchar, and text data types, whereas Unicode data is stored in the nchar, nvarchar, and ntext types. The char data type allows for the storage of fixed-length non-Unicode character data with lengths from 1 through 8,000. The varchar data type allows for the same sizes of data. The primary difference between the two is that the varchar uses storage space more efficiently and uses only the space necessary to store the data value, regardless of the maximum size a variable has been configured to store. The nchar and nvarchar are essentially the Unicode implementation of char and varchar, and allow for storage of up to 4,000 characters. The text and ntext data types are used to store large variable-length character data. The text data type can store up to 2,147,483,647

For high quality website hosting services please check java web hosting website.

Comments are closed.