将字符串转换为 uniqueidentifier 时失败的解决方法
时间:2019-11-27 20:02:01
收藏:0
阅读:713
当id为Guid时,字段类型为 uniqueidentifier,直接将查询出的多个id作为查询条件时会报错,如下图:

解决方法1:CAST(Id as varchar(36))

解决方法2:CONVERT(NVARCHAR(50),Id)

原文:https://www.cnblogs.com/Damon-LLJ/p/11944223.html
评论(0)