# Kinds of Data Type

The adhering to are the general data types predefined in the SQL language.

#### ( That are more classified right into subtypes):.

– Numeric – The worth defined by the numeric data type is some kind of a number, which could either be expressed with an exact or simply an approximate value.

Precise Numeric.

#### ▪ INTEGER–

This is composed just of numbers that are both favorable and also adverse. It includes a decimal neither a fractional component. The worth varies from -2,147,483,648 to 2,147,483,647, with an allocated 4 bytes of storage space size.

#### ▪ SMALLEST–

This is utilized in the substitute of integers to conserve storage space, but with a precision that can not be larger than that of an integer. Accuracy in computer programs is the maximum total amount of considerable figures a number can have. The worth varies from -32,768 to +32,767, with an assigned 2 bytes of storage size.

#### ▪ BEGIN–

This is the reverse of the SMALLINT, where its minimum accuracy coincides with the INTEGER data type or higher. The value varies from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807, with an assigned 8 bytes of storage space dimension.

#### ▪ NUMERIC (p, s)–

Along with the integer component, this data type additionally includes a fractional component that suggests the accuracy and range of the worth. The range is the variety of figures or areas booked in a fractional part of the data, situated at the best side of the decimal point. NUMERIC (p, s), defines the accuracy while is for the scale. For instance, NUMERIC (6, 3) means that the number’s outright value will only be up to 999.999 (6 total substantial figures with 3 numbers following the decimal point).

#### ▪ DECIMAL–

Like the NUMERIC data type 토토디비. This has a fractional element where you can specify both the value accuracy as well as scale. However, this data type allows better precision. As an example, DECIMAL (6, 3) can include worths up to 999.999 yet the database will certainly still approve worths larger than 999.999. Allow us to claim you went into the number 123.4564, this will certainly be settled to 123.456. The allocated storage dimension for this data type is based on the given accuracy.

### Approximate Numeric.

#### ▪ REAL–

This consists of a single-precision, floating-point number where the decimal point can “drift” to various areas in the stated number. This suggests that this data type’s decimal value has an unlimited accuracy as well as a range of variable sizes. For example, the worths for π (pi) can consist of 3.14159, 3.14, and also 3.1 (each worth has its own precision). For single-precision, floating-point numbers, their precision is in between 1 and 21 inclusive. It likewise allows 4 bytes of storage space size for its worths.

#### ▪ DOUBLE PRECISION–

This contains a double-precision, floating-point number and the ability is twice of the REAL data type. This information typically can be found helpful when you require a lot more precise numbers, like in a lot of clinical fields of disciplines. For double-precision, floating-point numbers, their accuracy is between 22 and also 53 inclusive. It also allocates 8 bytes of storage size for its worths.

#### ▪ FLOAT–

This is the data type that enables you to specify the accuracy. And also lets the computer system make a decision whether you will opt for a solitary- or a double-precision. It in fact pertains to both REAL and also DOUBLE ACCURACY, depending upon the precision you have actually defined. As a result of this particular, it is simpler to relocate the data source from one computer system to one more.