T-SQL Binary Weirdness

Published Mon, Sep 13 2004 17:23 | GregLow

It's always a good day when you learn something new. Steve Kass taught me something new about T-SQL today. If you execute the following:

SELECT 2 + 3

the value returned is 5. However, if you execute:

SELECT 0x2 + 0x3

the value returned is 0x0203.

Am I the only one who finds that bizarre?