ClickHouse/tests/queries/0_stateless/02009_decimal_no_trailing_zeros.sql
Alexey Milovidov 6ea1bd1e8c More tests
2021-08-17 09:02:37 +03:00

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);