JPQL中是否有任何運算符等同於SQL BINARY
?
我GOOGLE了很多,發現沒有人提到它。什麼是JPQL中的BINARY運算符?
在此先感謝!
對於二元運算符,這裏是在MySQL site描述。
The BINARY operator casts the string following it to a binary string.
This is an easy way to force a column comparison to be done byte by byte
rather than character by character. This causes the comparison to be case
sensitive even if the column is not defined as BINARY or BLOB. BINARY also
causes trailing spaces to be significant.
mysql> SELECT 'a' = 'A';
-> 1
mysql> SELECT BINARY 'a' = 'A';
-> 0
mysql> SELECT 'a' = 'a ';
-> 1
mysql> SELECT BINARY 'a' = 'a ';
-> 0
BTY,我使用MySQL 5.6。(雖然我不認爲這個問題與MySQL有關的做...)
這看起來像一個很大的SQL注入目標! –