FLOAT
Syntax
FLOAT( expression )
Description
Converts the expression
expression to fractional number format according to the following rules:
Type | Value |
---|---|
Fractional number | Integer |
Original value. |
Date | Datetime |
Unix time |
String |
A number from a decimal string. |
Boolean |
TRUE — 1.0 , FALSE — 0.0 . |
Argument types:
expression
—Boolean | Date | Datetime | Fractional number | Integer | String
Return type: Fractional number
Examples
FLOAT(7) = 7.0
FLOAT("34.567") = 34.567
FLOAT(TRUE) = 1.0
Data source support
ClickHouse 21.8
, Files
, Google Sheets
, Microsoft SQL Server 2017 (14.0)
, MySQL 5.7
, Oracle Database 12c (12.1)
, PostgreSQL 9.3
, Yandex Documents
, YDB
.