如何在oracle 10g的行中显示%符号? [英] how to display % symbol for a value in a row in oracle 10g ?

查看:101
本文介绍了如何在oracle 10g的行中显示%符号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





i有一个要求,比如我的客户端会给我发送值,而存储值我必须将%符号添加到该值。



Ex:



Hi ,

i got one requirement like my client will sent me the values , while storing the values i have to add % symbol to that value.

Ex:

create table test(payment number)
insert test values(1)
insert test values(2)
insert test values(0.1)







select * from test





付款

-------

1%

2%

0.1%



如何实现上述输出。



提前致谢



Payment
-------
1%
2%
0.1%

how can i achieve the above output.

Thanks in advance

推荐答案

使用此选择语句。



Use this select statement .

select to_char([payment number]) || ' %' from test ;


您好我通过以这种格式编写查询得到了答案



hi i got the answer by writing the query in this format

SELECT payment || ''%''  FROM test_1;


这篇关于如何在oracle 10g的行中显示%符号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆