Firebird Basic Data Type

Source: Internet
Author: User

Alter table student
Add znpf20 decimal (3, 1 ),
Add zjpf20 decimal (3, 1 ),
Add taidu20 decimal (3, 1)

 

 

[Share] basic data types of Firebird
Because of the typographical relationship, the power is [], for example, 10 [5], representing the power 5 of 10. Integer: long integer, value range:-2147483648 to 2147483647 float: single precision floating point type, value range: 1.175*10 [-38] To 3.402*10 [38] Double Precision: Double Precision Floating Point type, value Range: 2.225*10 [-308] to 1.797*10 [308] decimal: decimal type. The maximum number of valid digits can be 18 digits or 18 digits after the decimal point. For example, decimal (5, 2) is a five-digit number that does not contain the decimal point, for example, 123.45 numeric: decimal type. It is similar to decimal. The difference between decimal and decimal is described later. Note: When the data contains decimals, use decimal as much as possible, because the floating point type has Precision Problems, unless the value is very large, the floating point type is used! Difference between decimal and numeric:
For example, for fields defined by decimal () and numeric (), decimal () indicates that there are at least five digits, and more! Numeric (5, 2) indicates five digits, not many.

Smallint: Short integer, value range:-32768 to 32767. The value is relatively small. It can be used to save disk space and improve efficiency. Char: character type, up to 32767 characters. Note, if the char type is used, it is filled up with null characters even if the number of characters does not reach the width of the specified field! When setting the value, use functions such as trim () to remove extra null characters. Use the varchar type unless the number of characters in each record remains unchanged. Varchar: a variable-length character type with a maximum length of 32767 characters. during storage, the storage space is automatically changed based on the content length, and no extra null characters are generated. When the number of characters exceeds 32767, use blob. Time: Time type; value range: 00: 00 to. 9999 timestamp: Date and Time type; value range: January 1, January 1, 100 AD to January 1, 32768, February 29, and date and time information. Date: date type. value range: January 1, 32768 to January 1 ., Note: You must select dialect 3 to create a database to support the date type; otherwise, it is the timestamp type. BLOB: Large binary type. It can be text, binary data (binary, aspect, sound, etc.) or other subtypes. Value Range: 64 kB or less. The following error is returned !!!! Boolean: logic type, new type introduced by Firebird 2.0. Value Range: true or false ). The reason for using Boolean instead of smallint is that it can be stored with fewer digits and is compatible with SQL standards. However, data is not compatible with version 1.5.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.