数据库
首页 > 数据库> > sql server NEWID() 踩坑记

sql server NEWID() 踩坑记

作者:互联网

记录下踩过的坑...

该语句查询的结果集不一致

SELECT * FROM dbo.new_phonecodeBase WHERE  statecode=0 and new_phonecodeId <> NEWID() and new_phoneproductcode='5650730'

 

建议更换用法

SELECT * FROM dbo.new_phonecodeBase WHERE  statecode=0 and new_phonecodeId <> ‘00000000-0000-0000-0000-000000000000‘ and new_phoneproductcode='5650730'

 

标签:坑记,0000,dbo,phonecodeBase,server,NEWID,new,phoneproductcode
来源: https://www.cnblogs.com/zengtianli/p/15425027.html