1

I am trying to learn something new, might I know what is the error message mean?

enter image description here

enter image description here

I tried to change the code in below, then work fine. What is the difference between them?

enter image description here

AnsonChan
  • 43
  • 8
  • 1
    Please don’t post images. Add all relevant information to your question as editable text – NickW Mar 26 '23 at 12:18

1 Answers1

0

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.

Frédéric LOYER
  • 1,064
  • 5
  • 10