SQL How to convert a decimal to a string
In a SELECT statement I want to conv开发者_C百科ert values to strings ie. SELECT TO_STRING(value).
How can I do this in Oracle SQL?
You can use either the TO_CHAR
or the CAST
function:
SELECT TO_CHAR(123.45) FROM DUAL
SELECT CAST(123.45 AS VARCHAR2(10)) FROM DUAL
SELECT CAST(column_name as data_type) from ...
might work
HTH
精彩评论