时间:2021-07-01 10:21:17 帮助过:125人阅读
/*
CONCAT只能连接两个字符串
The syntax
for
the concat
function
is
:
concat( string1, string2 )
string1
is
the
first
string
to
concatenate.
string2
is
the
second
string
to
concatenate.
*/
--||可以连接多个字符串
SQL>
select
concat(
‘CSDN‘
,
‘_yeeXun‘
)
from
dual;
CONCAT(
‘CSDN‘
,
‘_YEEXUN‘
)
------------------------
CSDN_yeeXun
SQL>
select
‘CSDN‘
||
‘_yeeXun‘
from
dual;
‘CSDN‘
||
‘_YEEXUN‘
-----------------
CSDN_yeeXun
SQL>
select
concat(
‘CSDN‘
,
‘_yeeXun‘
,
‘china‘
)
from
dual;
select
concat(
‘CSDN‘
,
‘_yeeXun‘
,
‘china‘
)
from
dual
ORA-00909: invalid number
of
arguments
SQL>
select
‘CSDN‘
||
‘_yeeXun‘
||
‘china‘
from
dual;
‘CSDN‘
||
‘_YEEXUN‘
||
‘CHINA‘
--------------------------
CSDN_yeeXunchina
Oracle的字符连接函数 concat 和 || 的区别
标签:sel 函数 number line span word 多个 contain com