You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -736,15 +736,17 @@ The table below describes which `CAST` conversions are supported:
736
736
737
737
²The conversion of DATETIME and DECIMAL to STRING (limited) is supported only if the value fully fits into the string length. The conversion can fail if the resulting string length is less than 20.
738
738
739
-
Converting `DATETIME` or `BOOLEAN` to `STRING` returns different format per database.
739
+
³Converting `DATETIME` or `BOOLEAN` to `STRING` returns different format per database.
740
740
741
-
##### `DECIMAL` precision
741
+
⁴See [`DECIMAL` precision](#dec-prec), below, for further information.
742
742
743
-
`DECIMAL`data type can have precision and scale as parameters:
743
+
##### `DECIMAL` precision{#dec-prec}
744
744
745
-
-`DECIMAL(<precision>, <scale>)` — in the case when both parameters are specified, those values are used as precision and scale of the resulting data type
746
-
-`DECIMAL(<precision>)` — when only precision is specified, scaale is set to 0. The resulting data type in that case is `DECIMAL(<precision>, 0)`
747
-
-`DECIMAL` — when no parameters are specified, default values are used. Precision is set to 28, and scale is set to 8: `DECIMAL(28, 8)`
745
+
`DECIMAL` data type can have precision and scale as parameters. This will have the following impact on the way data is converted:
746
+
747
+
*`DECIMAL(<precision>, <scale>)` – when both parameters are specified, those values are used as precision and scale of the resulting data type
748
+
*`DECIMAL(<precision>)` – when only precision is specified, scale is set to 0. The resulting data type in that case is `DECIMAL(<precision>, 0)`
749
+
*`DECIMAL` – when no parameters are specified, default values are used. Precision is set to 28, and scale is set to 8: `DECIMAL(28, 8)`
748
750
749
751
If the original value has more digits in the fractional part than required scale, the fractional part is rounded to the required scale. In that case, rounding is done according to the database configuration.
750
752
@@ -768,7 +770,7 @@ SELECT (Number : 2) as Normal, (Cast(Number AS DECIMAL) : 2) as Casted FROM Sale
768
770
| 1 | 1.0 |
769
771
| 1 | 1.5 |
770
772
771
-
In case of conversion to `DECIMAL`, scale and precision can be specified
773
+
In the case of conversion to `DECIMAL`, scale and precision can be specified
0 commit comments