SQL > SQL????? > Concatenate

?? ??? ??? ???? ?? ???? ?? ??? ??? ????.?? ???????? ? ??? ???? ?? ??? ???? ????.

  • MySQL: CONCAT( )
  • Oracle: CONCAT( ), ||
  • SQL Server: +

CONCAT( ) ? ??:

CONCAT( ?????? 1, ?????? 2, ?????? 3, ...)

??????1, ??????2, ??????3, ? ???? ??? ?????. Oracle?CONCAT( )? ??? ????? ???;????? ??? ??? ???? ??? ???? ????? ?? ????.???Oracle??? ???'||'? ??? ???? ???? ??? ???? ????.

?. ??? ?? ??? ?? ????:

Geography ??
Region_NameStore_Name
EastBoston
EastNew York
WestLos Angeles
WestSan Diego

? 1:

MySQL/Oracle:

SELECT CONCAT (Region_Name, Store_Name) FROM Geography
WHERE Store_Name = 'Boston';

??:

'EastBoston'

? 2:

Oracle:

SELECT Region_Name || ' ' || Store_Name FROM Geography
WHERE Store_Name = 'Boston';

??:

'East Boston'

? 3:

SQL Server:

SELECT Region_Name + ' ' + Store_Name FROM Geography
WHERE Store_Name = 'Boston';

??:

'East Boston'

SQL SUBSTRING >>
?


Copyright © 2021   1keydata.com   All Rights Reserved