本文介绍了如何在SQL Server中比较两个图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我需要比较已插入Image Data Type列的Image和通过SQL Stored Procedure的Image Object,是否可以通过SQL脚本进行比较? 我尝试了什么: 我尝试使用下面的脚本,但它不能正常工作 创建表foo ( img image ) go 选择* 来自foo a,foo b WHERE convert(varbinary,a.img) = convert(varbinary,b.img)I need to compare the Image which already inserted in the Image Data Type column and the Image Object which passed through the SQL Stored Procedure, Is it possible to compare through SQL script?What I have tried:I tried with the below script, but it is not workingcreate table foo ( img image )goselect *from foo a, foo bWHERE convert(varbinary,a.img) = convert(varbinary,b.img)推荐答案SELECT *FROM foo As a INNER JOIN foo As bON CONVERT(varbinary(max), a.img) = CONVERT(varbinary(max), b.img); 如果没有,那么你需要前明白问题是什么。 注意:只有字节完全相同时,记录才会匹配。如果单个字节不同,则图像被认为是不同的,即使它们看起来相同。If it doesn't, then you'll need to explain what the problem is.NB: The records will only match if the bytes are exactly the same. If a single byte is different, the images are considered different, even if they look the same. 这篇关于如何在SQL Server中比较两个图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
07-29 11:58
查看更多