how to concatenate more than two columns in plsql developer? [duplicate]

被刻印的时光 ゝ 提交于 2020-01-09 11:58:52

问题


when I run the below query

select concat(column1,column2,column3)  as concatcolumn from table

I get an error "ORA-00909:INVALID NUMBER OF ARGUMENTS"


回答1:


Concat only takes two arguments. See: http://docs.oracle.com/cd/B19306_01/server.102/b14200/functions026.htm

Use the concatenation operator:

select column1 || column2 || column3 ...



回答2:


select ([column1]+','+[column2]+','+[column3]) as concatcolumn from table

Try above the query.it may changes on different type of column data type.



来源:https://stackoverflow.com/questions/29917761/how-to-concatenate-more-than-two-columns-in-plsql-developer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!