# Float Datatype in Oracle Database

In this Oracle tutorial, we will learn about the float datatype in the oracle database. Also, we will demonstrate how to use it to create float columns for a table.

## Introduction to Oracle FLOAT datatype

Floating-point numbers of the FLOAT datatype have a binary precision of b. This datatype’s default precision is 126 binary or 38 decimals.

Due to the fact that there is no finite amount of digits after the decimal point, this is known as a floating point.

### Oracle float datatype Syntax

Until now, we have understood the float datatype in a database and discussed the purpose of the floating point. Next, we will take a step further and understand how to use it to create float columns for a table.

For this, we need to understand the syntax to use a float datatype in oracle 21c which is given below.

``FLOAT[(pre)]``

The FLOAT Datatype in Oracle allows you to determine the precision. The scale cannot be specified since Oracle Database selects the scale based on the data. FLOAT has a 126-point precision limit.

Also, check: Oracle Database vs MySQL Database

## Oracle float datatype Examples

After discussing the syntax, we will now discuss the example of how to use the float datatype in oracle 21c.

Here we will discuss how to use the float datatype in the SQL developer tool manually. First, we will click the right selection on the table folder and then click on a new table.

Recomendadtion: How to create a database in Oracle 19c

After selecting the new table option, we will mention the name of the table. Here is the table for our example execution and this employees table is located in the pdb database.

After creating the table, we will insert the column name and provide the datatype in this example, we utilize the float datatype with size(20).

Here are the table column names

Now we will insert the values into a table.

Example:

Now we will create a table by statement and check how we can use the float datatype in the given customers table.

``CREATE TABLE customers (cust_id NUMBER(5,2), product_price FLOAT(5));``

Now we will insert the values and display the float values.

``````INSERT INTO customers VALUES (67, 2.45);
INSERT INTO customers VALUES (23, 9.523);``````