sql代码如下:
--转换成varchar类型
Convert(varchar,C0057_PubDate,120) like '%2010-10-09%'
--两个字段拼接成一个字段
SELECT C0252_ID,C0252_name,C0252_Addr,((select top 1 C0003_Name from dbo.T0003_DistrictInfo where c0003_code like '%'+SUBSTRING(C0003_AreaCode,1,4)+'%')+' '+C0003_AreaName) as AreaName
FROM dbo.T0252_Manufacturer
Select CONVERT(varchar(100),GETDATE(),23) : 2006-05-16
---- 来自jb51.cc
原文链接:https://www.f2er.com/mssql/530169.html