Look at a character and do nothing with it
Wednesday, September 29, 2010
SUM(A + B) vs SUM(A) + SUM(B)
In PostgreSQL, a integer plus a null get null, so these two expressions is different not only in result but also in logic:
SELECT SUM(A + B) FROM youtable;
SELECT SUM(A) + SUM(B) FROM youtable;
You can verify this if your A or B has null value.
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment