开发者

Need help with Binary Columns

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜