在blob上选择distinct [英] Select distinct on blob

查看:633
本文介绍了在blob上选择distinct的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法来验证Oracle数据库中更多行中的blob中的值是否相同? blob是同一列。

Is there a way to verify if the value in blob in more rows is identical in the Oracle database? The blob is the same column.

我有一个存储在另一列的BLOB的大小,但我需要知道该值是否相等。

I have the size of the blob stored in another column but I need to know if the value is equal too.

存储的值是一个序列化对象。

The value stored is a serialized object.

推荐答案

建议您添加另一列,其中包含散列值的blob值。当你存储blob时,你还计算哈希值,例如使用 SHA256 ,并存储它。当您稍后需要不同的值时,您只需使用此新列。

I would recommend adding another column which contains the hash of the blob value. When you store the blob you also calculate the hash value, using SHA256 for example, and store that. When you later want distinct values you just use this new column.

这篇关于在blob上选择distinct的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆