码迷,mamicode.com
首页 > 数据库 > 详细

SQL server 字段合并CAST(org_no AS VARCHAR(20))+CAST(page_no AS VARCHAR(20))+CAST(djlb_no AS VARCHAR(20)))

时间:2019-09-11 17:33:12      阅读:98      评论:0      收藏:0      [点我收藏+]

标签:sql   basic   efi   bsp   nbsp   gnu   where   mysq   oracle   

sql server 字段合并(CAST)

----------------------

select (CAST(org_no AS VARCHAR(20))+CAST(page_no AS VARCHAR(20))+CAST(djlb_no AS VARCHAR(20))) from ERP_BASIC_BILLNO_PREFIX where org_num=#{orgNum} and page_name=#{pageName} and djlb_name=#{djlbName};")

字段1+字段2

 

oracle 字段合并(CONCAT)

----------------------

select (Concat(Concat(CODE,‘_‘),NAME)) 合并结果集 from GoodsCate

 

mysql 字段合并(CONCAT)

----------------------

SELECT declare_type_id,support_model,project_name,CONCAT(declare_type_id,support_model,project_name) from gf_index;

 

SQL server 字段合并CAST(org_no AS VARCHAR(20))+CAST(page_no AS VARCHAR(20))+CAST(djlb_no AS VARCHAR(20)))

标签:sql   basic   efi   bsp   nbsp   gnu   where   mysq   oracle   

原文地址:https://www.cnblogs.com/gzhbk/p/11507491.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!