开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜