Skip to content

Instantly share code, notes, and snippets.

@yeikos
Last active December 24, 2015 19:49
Show Gist options
  • Save yeikos/6853452 to your computer and use it in GitHub Desktop.
Save yeikos/6853452 to your computer and use it in GitHub Desktop.
SELECT ROUND(2.5); /* 3 */
SELECT ROUND('2.5'); /* 2 */
SELECT ROUND(1.5); /* 2 */
SELECT ROUND('1.5') /* 2 */
SELECT ROUND(0.5); /* 1 */
SELECT ROUND('0.5') /* 0 */
SELECT ROUND(
CAST('0.5' AS DECIMAL(10, 2))
) /* 1 */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment