这是hibernate查询我想在sql server上运行它但是concat函数不在sql server中我该怎么做。
strQuery = "from TempData where englishLex=:englishLex and category =:category and language=:language and login=:login and domain=:domain group by (concat(englishlex,category)) ";
答案 0 :(得分:0)
方法1:连接两个字符串
SELECT 'FirstName' + ' ' + 'LastName' AS FullName
方法2:连接两个数字
SELECT CAST(1 AS VARCHAR(10)) + 'R' + CAST(2 AS VARCHAR(10))
方法3:连接表列的值
SELECT FirstName + ' ' + LastName
FROM AdventureWorks.Person.Contact