-
Dustin Waybright thinks this is interesting:
WHERE propertytype = 'INT' AND CAST(propertyval AS INT) > 10
Suppose that the table being queried holds different property values. The propertytype column represents the type of the property (an INT, a DATE, and so on), and the propertyval column holds the value in a character string. When propertytype is ‘INT’, the value in propertyval is convertible to INT; otherwise, not necessarily.
Minimise