Hello!

In the SQL Standard all character strings with universal character set (H2 
doesn't have any other character sets) are comparable with each other and 
all numbers are comparable with each other. Comparison operations between 
different groups of data types aren't described, so there is no required 
behavior and you cannot assume anything about them, for example, database 
may reject them all.

De-facto database systems usually allow this comparison and convert 
character strings to numbers, so there is nothing special in behavior of 
H2. This behavior is actually useful for the most of cases.

In your case you need to use '12345' instead of 12345 to avoid failures and 
to allow usage of index (if this column has an index or a primary key or 
unique constraint).

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/h2-database/156fc3f2-f63e-4a81-953d-5d96e74e7d3fn%40googlegroups.com.

Reply via email to