Appendix 2.
• INT [(len)] is an integer with a length of 4 bytes, which is represented at the output as much as len in numbers;
• SMALLINT [(len)] is an integer 2 bytes long, which is represented at the output maximum len digits;
• FLOAT [(len, dec)] - the real number that is displayed when outputting len dec characters after decimal point;
• CHAR (size) - a string of fixed-length characters of the size of characters;
• VARCHAR (size) - a string of characters of variable length with a maximum size of up to size of characters;
• BLOB (Binary Large OBject) - an array of arbitrary (binary) bytes (the maximum size depends on the implementation, usually it is 65535 bytes); this type of data can be used, for example, to store images;
• DATE - astronomical date;
• TIME - astronomical time. Character constants (type CHAR and VARCHAR) are written as sequences Characters enclosed in single apostrophes, such as "brass". Decimal constants (such as FLOAT) can be written in “scientific” notation as The sequence of the following components:
• number sign;
• decimal number with a dot;
• the symbol "e";
• sign (“+” or “-”) of the exponent;
• an integer playing the role of the exponent of 10. For example, the decimal number -0.123 can be written as -12.3e-2. The difference between the CHAR and VARCHAR data types is that for storage in a table
character strings of type CHAR use exactly size bytes (although the contents of the stored strings may be significantly shorter), while for VARCHAR strings, unallocated string characters (“empty”) bytes are not stored in the table. We emphasize that the len and dec values (unlike size) do not affect the storage size. data in the table, and only format the output of data from the table.
Материалы на данной страницы взяты из открытых источников либо размещены пользователем в соответствии с договором-офертой сайта. Вы можете сообщить о нарушении.