This is the space for sharing knowledge on RDBMS and SQL Programming
"Knowledge is the only thing which can grow while sharing"
Keep sharing keep growing...
Thursday, July 2, 2009
Select the Nearest Integer value by passing Float
Consider the Sample table
Query:
Ms-Sql:
select top 1 number from Sample order by abs(number-3.7) ,number desc
My-Sql:
select number from Sample order by abs(number-3.7) ,number desc limit 1
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.