Subject Re: [firebird-support] How smart is sql...comparing strings
Author Helen Borrie
At 08:26 PM 2/02/2004 +0100, you wrote:

>Hi, I have a stored procedure and in one of my WHERE clauses I ask this:
>
>select ...
>from ...
>where col1 > '123'
>
>Here '123' is a string (VarChar), so my question is whether sql is able
>to compare strings.

Sure - but it compares them as strings (alphanumeric sequence), not as
numbers. So if col1 is '1' it will be higher than '123'. 'Tis not a
question of "How smart is sql?"...but of "How smart is the question?"

/hb