Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4248142
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T04:12:39+00:00 2026-05-21T04:12:39+00:00

it s enough to round a column value in plsql by using round(value,2) .

  • 0

it s enough to round a column value in plsql by using round(value,2). For example 1.2222 can be converted to 1.22 by that function in plsql.

How can I do that in SQL Server? When I use round(1.2222,2), it converts 1.2200. I want 1.22. Thanks for help

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T04:12:40+00:00Added an answer on May 21, 2026 at 4:12 am

    Mathematically, 1.2200 and 1.22 are the exact same number.

    The display of the number is actually a string that is different from the physical content of the number, so the number is rounded the same in SQL Server and Oracle, it’s just displayed diferently.

    More, about SQL float point types: if you declare a variable as having a s decimal places, it will always display as having s decimal places, regardless of the value, for example

    declare @x decimal(10,6)
    declare @y decimal(10,2)
    set @x =3
    set @y=@x -- identical to set @y=cast(@x as decimal(10,2))
    
    select @x -- selects 3.000000
    select @y -- selects 3.00
    
    select 'The number is ' + cast(@x as varchar) -- selects 'The number is 3.000000'
    select 'The number is ' + cast(@y as varchar) -- selects 'The number is 3.00'
    

    However, there is a technical difference about the meaning of 3.00 and 3.0000, and that’s the relative error of the number. Since all real numbers are rounded, 3.00 actually means 3 +/- 0.005 , and 3.0000 is actualy 3 +/- 0.00005, as more significant digits are known.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Seems like a simple enough question but I can't seem to find the answer.
Is SSL secure enough for using sensitive data (like password) in query string? Is
I haven't play enough with this and usually use mocks, but I wonder what
It's simple enough to code up a class to store/validate something like 192.168.0.0/16 ,
There are enough resources on how to convert an expression tree into postfix notation,
I was fortunate enough to not do any cgi-bin .cgi based web development. But
Seemingly a simple enough question, but I cannot work it out. I want to
It's easy enough to set up a table view to allow editing. Just add
Having read the threads Is SqlCommand.Dispose enough? and Closing and Disposing a WCF Service
I think title should be good enough.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.