sql server NEWID() 踩坑记

2021/10/19 19:12:08

本文主要是介绍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'

 



这篇关于sql server NEWID() 踩坑记的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程