📜  oracle 百分比 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:35.402000             🧑  作者: Mango

代码示例1
-- Formatted
SELECT decimal_column * 100 || '%' AS percentage FROM table_name;
-- Rounded
SELECT round(decimal_column * 100, 2) || '%' AS percentage FROM table_name;
-- Value
SELECT decimal_column * 100 AS percentage FROM table_name;
SELECT TO_CHAR(decimal_column,'fm990D00','NLS_NUMERIC_CHARACTERS = ''.,''') 
    FROM dual;