第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

mysql函數(shù)中concat在sqlserver函數(shù)中怎么用?

mysql函數(shù)中concat在sqlserver函數(shù)中怎么用?

慕桂英3389331 2018-12-18 16:18:13
mysql函數(shù)中concat在sqlserver函數(shù)中怎么用
查看完整描述

1 回答

?
白豬掌柜的

TA貢獻1893條經(jīng)驗 獲得超10個贊

本來程序數(shù)據(jù)庫用的是mysql,后來轉(zhuǎn)為sql server2005,
其中一個sql為:

select * from dbo.sys_person_info t where t.VALID_FLAG>0
and t.dept_id in(select a.dept_code from sys_dept a,sys_dept b
where a.sort_no like concat(b.sort_no,'%') and b.dept_code ='37010001'
)
程序報錯:說concat函數(shù)不是內(nèi)置的函數(shù),原來是sql server沒有concat這個函數(shù),把代碼做了一下修改
代替了concat函數(shù),希望對大家有所幫助:
select * from dbo.sys_person_info t where t.VALID_FLAG>0
and t.dept_id in(select a.dept_code from sys_dept a,sys_dept b
where a.sort_no like b.sort_no + ''+'%' and b.dept_code ='37010001'
)

在oracle里的用法(沒有測試):
select * from dbo.sys_person_info t where t.VALID_FLAG>0
and t.dept_id in(select a.dept_code from sys_dept a,sys_dept b
where a.sort_no like b.sort_no || ''|| '%' and b.dept_code ='37010001'
)

 


查看完整回答
反對 回復(fù) 2019-01-05
  • 1 回答
  • 0 關(guān)注
  • 470 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號