Hi ,Manish
I think that SQL Server internally convert a first character to the INT and
compare them
IF '130-0074321'>'211-4988260'
PRINT 'Yes'
ELSE
PRINT 'No'
In above example SQL Server is comparinmg 1 (first character) from the
first parameter to the 2 (first character) from the second parameter and
result is NO
[quoted text, click to view] "Manish Sukhija" <ManishSukhija@discussions.microsoft.com> wrote in message
news:C4ABE18E-6C0D-4B91-9F7E-30454D398737@microsoft.com...
> Hi,
> when i run this query
> select * from personal where phone > '40-8496-7223'
> it works fine, eventhough i declared phone as
> varchar type, it should not operate on > operator.
> what could be reason