SQL有关的字符串拼接

1.字符串与某一查询栏位简单的拼接:

SQL有关的字符串拼接SQL有关的字符串拼接
Select KS3F || a.Line_Name as Line_Name
  From Sfis1.c_Line_Desc_t a
 Where a.Line_Name Like 3SMT%
View Code

2.字符串与某一查询栏位的截取拼接:

SQL有关的字符串拼接SQL有关的字符串拼接
Select KS3F || substr(a.Line_Name, 2, 4) as Line_Name
  From Sfis1.c_Line_Desc_t a
 Where a.Line_Name Like 3SMT%
View Code

3.字符串与某一查询栏位的截取去空拼接:

SQL有关的字符串拼接SQL有关的字符串拼接
Select KS3F || trim(substr(a.Line_Name, 2, 8)) as Line_Name
  From Sfis1.c_Line_Desc_t a
 Where a.Line_Name Like 3SMT%
View Code

 

SQL有关的字符串拼接

上一篇:SQL Count(*)函数,GROUP_By,Having的联合使用


下一篇:MySQL Structured Query Language