Discover decimal data type teradata, include the articles, news, trends, analysis and practical advice about decimal data type teradata on alibabacloud.com
[0]6 type of data :[0.1] Basic data type: Undefined, Null, Boolean, number, String[0.1.1] Basic type value refers to simple data segments, 5 basic types are accessed by value, because you can manipulate the actual values saved in
Java Data Type (I)
1. Diagram of java data types:
Ii. Explanation of Basic java data types and value range
(1) Integer type
1. byte type
Byte occupies 8 digits in the computer, and the byte is a signed integer. When expressed in
( $157.27 AS VARCHAR(10) )
CAST functions are based on SQL-92 standards and take precedence over CONVERT.
When the number of decimal places in a conversion is different from the data type, the result value is sometimes truncated and sometimes rounded.
Converted data type
is relatively safe and does not accept embedding of malicious script contentint integral typeThe int data type can store integers from 2 to 31 powers (-2147483648) to 2 to 31 powers (2147483 647). Almost all numeric data stored in a database can be used with this data type.
Whether in a small free database space or a large e-commerce website, it is necessary to reasonably design the table structure and make full use of the space. This requires us to fully understand the common data types of database systems. Next I will share some of my experiences with you. 1. digit type. The number types are classified into three categories by my classification method: integer, small, whethe
to display the date and time in a different format. The style is the conversion style number that is provided by the SQL Server system when converting Datatime and smalldatetime data to strings, and different style numbers have different output formats.Money is an integer integer----> Char char (Money)char-------> Integer integer (Trim (char))Money is double (8,2) Double----->char char (CAST (Money as Decimal
following character through an escape sequence:When you write an application, the strings that contain these special characters must be escaped correctly before they are used for data values that are sent to the MySQL server's SQL statement. You can do this in two ways:
Handles strings with functions that escape special characters. For example, in a C program, you can use the mysql_real_escape_string () C API function to escape characters.
Microsoft Access Data type
Data Type
Description
Storage
Text
Used for text or a combination of text and numbers. A maximum of 255 characters.
Memo
Memo is used for a larger number of text. Stores a maximum of 65,536 characters.Note: The memo field can
type This is a variable-length string that contains data in Unicode format. NVARCHAR2 can store up to 4,000 bytes of information. Two. Number types 2.1 Number Type Number (P,s) is the most common numeric type that can hold a data range of 10^130~10^126 (without this valu
, for example:
Column number (precision, scale)
Precision indicates the valid digit in the number. If precision is not specified, Oracle uses 38 as the precision.
Scale indicates the number of digits to the right of the decimal point. scale is set to 0 by default. If scale is set to a negative number, Oracle will select this number to the specified number to the left of the decimal point.
Date
1. Integral type
MySQL data type
Meaning (Signed)
tinyint (m)
1 byte range ( -128~127)
smallint (m)
2 byte range ( -32768~32767)
Mediumint (M)
3 byte range ( -8388608~8388607)
Int (m)
4 byte range ( -2147483648~2147483647)
BigInt (M)
8 byte Range (18
: dual-precision floating point, in fact, is a decimal. such as 5.43,-2.3, 0.0 (note, 0.0 is a decimal)# float: single-precision floating-point type, also a decimal, is less accurate than a double, meaning it can represent fewer decimal places. To differentiate from double,
floating-point number:"
cout "float:"
cout "double:"
exponential maximum of the//decimal floating-point number
cout "exponential maximum of decimal floating-point number:"
cout "float:"
cout "double:"
exponential minimum of the//decimal floating-point number
cout "exponential minimum of decimal
All data is stored in binary form in the calculation, whereas a 8-bit binary number represents 1 bytes.Usually we say how many bytes a data type is, which means that the data type can represent how many bits of binary number, and the binary number can be converted to
Datetime
8 bytes, date time, format: 2014-09-18 08:42:30
Timestamp
4 bytes, automatically stores the time the record was modified
Year
1 bytes, year
Numeric data typeIntegral type
MySQL data type
Meaning (Signed)
Datetime
8 bytes, date time, format: 2014-09-18 08:42:30
Timestamp
4 bytes, automatically stores the time the record was modified
Year
1 bytes, year
Numeric data typeIntegral type
MySQL data type
Meaning (Signed)
Datetime
8 bytes, date time, format: 2014-09-18 08:42:30
Timestamp
4 bytes, automatically stores the time the record was modified
Year
1 bytes, year
Numeric data typeIntegral type
MySQL data type
Meaning (Signed)
Datetime
8 bytes, date time, format: 2014-09-18 08:42:30
Timestamp
4 bytes, automatically stores the time the record was modified
Year
1 bytes, year
Numeric data typeIntegral type
MySQL data type
Meaning (Signed)
tinyint
, such as 0123,034.2.3 Long Integral typeThe long integer must end with L, such as 9l,342l.2.4 Floating-point constantsBecause the default type of a decimal constant is double, you must add F (f) to the back of the float type. The same variable with a decimal number defaults to the double type.float F;
f=1.3f
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.