mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-02 04:22:03 +00:00
64 lines
1.3 KiB
Plaintext
64 lines
1.3 KiB
Plaintext
-- { echo }
|
|
|
|
SELECT 1.123::Decimal64(1);
|
|
1.1
|
|
SELECT 1.123::Decimal64(2);
|
|
1.12
|
|
SELECT 1.123::Decimal64(3);
|
|
1.123
|
|
SELECT 1.123::Decimal64(4);
|
|
1.123
|
|
SELECT 1.123::Decimal64(5);
|
|
1.123
|
|
SELECT 1.123::Decimal64(10);
|
|
1.123
|
|
SELECT 1::Decimal64(0);
|
|
1
|
|
SELECT 1::Decimal64(1);
|
|
1
|
|
SELECT 1::Decimal64(10);
|
|
1
|
|
SELECT 1.1234567::Decimal32(8);
|
|
1.1234567
|
|
SELECT 1.1234567890::Decimal64(10);
|
|
1.123456789
|
|
SELECT 1.1234567890::Decimal128(10);
|
|
1.123456789
|
|
SELECT 1.1234567890::Decimal256(10);
|
|
1.123456789
|
|
SELECT 1.123456789012345678901::Decimal256(20);
|
|
1.1234567890123456789
|
|
SELECT 1.123456789012345678901::Decimal256(22);
|
|
1.123456789012345678901
|
|
SET output_format_decimal_trailing_zeros = 1;
|
|
SELECT 1.123::Decimal64(1);
|
|
1.1
|
|
SELECT 1.123::Decimal64(2);
|
|
1.12
|
|
SELECT 1.123::Decimal64(3);
|
|
1.123
|
|
SELECT 1.123::Decimal64(4);
|
|
1.1230
|
|
SELECT 1.123::Decimal64(5);
|
|
1.12300
|
|
SELECT 1.123::Decimal64(10);
|
|
1.1230000000
|
|
SELECT 1::Decimal64(0);
|
|
1
|
|
SELECT 1::Decimal64(1);
|
|
1.0
|
|
SELECT 1::Decimal64(10);
|
|
1.0000000000
|
|
SELECT 1.1234567::Decimal32(8);
|
|
1.12345670
|
|
SELECT 1.1234567890::Decimal64(10);
|
|
1.1234567890
|
|
SELECT 1.1234567890::Decimal128(10);
|
|
1.1234567890
|
|
SELECT 1.1234567890::Decimal256(10);
|
|
1.1234567890
|
|
SELECT 1.123456789012345678901::Decimal256(20);
|
|
1.12345678901234567890
|
|
SELECT 1.123456789012345678901::Decimal256(22);
|
|
1.1234567890123456789010
|