سؤال

I want to test if a certain BLOB starts with character 255 (\xff). Is there a way to encode this character in a literal string?

Table 9.1. Special Character Escape Sequences gives certain special characters but not a way to encode arbitrary characters.

Failing a way to encode characters, is there a different workaround?

هل كانت مفيدة؟

المحلول

Use a hexadecimal literal, e.g. X'FF'. See http://dev.mysql.com/doc/refman/5.0/en/hexadecimal-literals.html

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top