开发者

Need help with Binary Columns

开发者 https://www.devze.com 2022-12-20 09:39 出处:网络
I have to query a column containing a Binary column with data like this ®â{Õ■K!Eòû▓♫;#§ø.

I have to query a column containing a Binary column with data like this ®â{Õ■K!Eòû▓♫;#§ø.

How can i query this colmn开发者_运维百科..if I wanted something like:

SELECT Name FROM Users WHERE ID = ®â{Õ■K!Eòû▓♫;#§ø

THanks


Several RDBMS (I thinks at least MySQL ans MS SQL Server) use the 0x………… notation where you put 0x + your binary bytes in hexadecimal pairs, e.g. SELECT Name FROM Users WHERE ID = 0x402041 matches id '@ A'.

PostGreSQL uses escaping and the bytea type.

I've also read something about the format X'402041'.

This is depedent on your SQL flavour, you should check the corresponding documentation for "binary litterals" or "binary strings".

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号