数据如图:
获取RBuilding字段值中有‘一号楼的数据’
select * from TB_BLSRunConfig where RBuilding like CONCAT('%','1号楼','%')
结果:
根据时间排序取最新的一条数据
select top 1 * from TB_BLSRunConfig where RBuilding like CONCAT('%','1号楼','%') order by CreateDate desc
标签:段值,sqlserver,RBuilding,逗号,CONCAT,TB,select From: https://www.cnblogs.com/ZhuMeng-Chao/p/17268228.html