other
SQL database systems.
-
- If you have a column of type smallint or
- bigint with an index, you may encounter problems
- getting the system to use that index. For instance, a clause of
- the form
-... WHERE smallint_column = 42
-
- will not use an index, because the system assigns type
- integer to the constant 42, and
- cannot use an index when two different data types are involved. A
- workaround is to single-quote the constant, thus:
-... WHERE smallint_column = '42'
-
- This will cause the system to delay type resolution and will
- assign the right type to the constant.
-
-
-