# Number data types in SQL

OBJECTIVE

In this chapter you will learn:

#### What is number data type?

The data type which store the value in the form of number, integer, decimal etc. is called number data type. Here you will get some number data types that are used to store different kinds of numeric data in sql.

Data typesRangeUsed to storeStorage (Bytes)
int-2,147,483,648 to 2,147,483,647Integer data (whole numbers)4
smallint(-32,768) to (32,767)Integer data2
tinyint0 to 255Integer data1
bigint(-9,223,372,036,854,775,808) to (9,223,372,036,854,775,807)Integer data8
decimal-10^38 +1 to 10^38 -1Numeric data types with a fixed precision and scale5 to 17
numeric-10^38 +1 to 10^38 -1Numeric data types with a fixed precision and scale5 to 17
float-1.79E+308 to -2.23E-308, 0 and 2.23E-308 to 1.79E+308Floating Precision data4 to 8
money(-922,337,203,685,477.5808) to (922,337,203,685,477.5807)Monetary data8
smallmoney(-214,748.3648) to (214,748.3647)Monetary data4
real-3.40E + 38 to 3.40E + 38Floating precision number4

SUMMARY

In this chapter we have learned about numeric data types and types of numeric data. In the next chapter we will study about date data type and also we will know about types of date data type.