mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-18 04:12:19 +00:00
38 lines
1023 B
SQL
38 lines
1023 B
SQL
-- { echo }
|
|
|
|
SELECT 1.123::Decimal64(1);
|
|
SELECT 1.123::Decimal64(2);
|
|
SELECT 1.123::Decimal64(3);
|
|
SELECT 1.123::Decimal64(4);
|
|
SELECT 1.123::Decimal64(5);
|
|
SELECT 1.123::Decimal64(10);
|
|
SELECT 1::Decimal64(0);
|
|
SELECT 1::Decimal64(1);
|
|
SELECT 1::Decimal64(10);
|
|
|
|
SELECT 1.1234567::Decimal32(8);
|
|
SELECT 1.1234567890::Decimal64(10);
|
|
SELECT 1.1234567890::Decimal128(10);
|
|
SELECT 1.1234567890::Decimal256(10);
|
|
SELECT 1.123456789012345678901::Decimal256(20);
|
|
SELECT 1.123456789012345678901::Decimal256(22);
|
|
|
|
SET output_format_decimal_trailing_zeros = 1;
|
|
|
|
SELECT 1.123::Decimal64(1);
|
|
SELECT 1.123::Decimal64(2);
|
|
SELECT 1.123::Decimal64(3);
|
|
SELECT 1.123::Decimal64(4);
|
|
SELECT 1.123::Decimal64(5);
|
|
SELECT 1.123::Decimal64(10);
|
|
SELECT 1::Decimal64(0);
|
|
SELECT 1::Decimal64(1);
|
|
SELECT 1::Decimal64(10);
|
|
|
|
SELECT 1.1234567::Decimal32(8);
|
|
SELECT 1.1234567890::Decimal64(10);
|
|
SELECT 1.1234567890::Decimal128(10);
|
|
SELECT 1.1234567890::Decimal256(10);
|
|
SELECT 1.123456789012345678901::Decimal256(20);
|
|
SELECT 1.123456789012345678901::Decimal256(22);
|