Friday, August 19, 2011

[mssql] ^ (Cap) is not the same with SQUARE()

Never use the ^ (cap sign) to replace the SQUARE() function.

SELECT 1024 ^ 2
result: 1026

SELECT SQUARE(1024)
result: 1048576

You see the difference!