I am trying to learn something new, might I know what is the error message mean?
I tried to change the code in below, then work fine. What is the difference between them?
I am trying to learn something new, might I know what is the error message mean?
I tried to change the code in below, then work fine. What is the difference between them?
Simply, Dune is picky about the type of the arguments you give him, then 0x40
, 64
, and '@'
can't be compared. (Note that all these values can be compared on MySQL, but, 64=0x40
, 64='64'
and 0x40='@'
which can be weird : a single number written in different ways equals different strings).
Type strictness can be handy, since it avoids errors which can be easilly detected by the computer. I tend to prefer such languages.
Note that if you type SELECT '\x1234'
, you have the result \x1234
, a 6 characters string, not exactly what you would mean. This is confirmed with select length('\x1234');
(6). The \
is not interpreted.
Note that on MySQL, select length ('\\')
returns 1, and on Dune returns 2. It seems \
has not the common behaviour of SQL.