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 8162255
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T18:40:01+00:00 2026-06-06T18:40:01+00:00

Is trunc and round the same with negative arguments? SQL> select round(123456.76,-4) from dual;

  • 0

Is trunc and round the same with negative arguments?

       SQL> select round(123456.76,-4) from dual;

        ROUND(123456.76,-4)
         -------------------
         120000

         SQL> select trunc(123456.76,-4) from dual;

          TRUNC(123456.76,-4)
          -------------------
         120000
  • 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-06-06T18:40:03+00:00Added an answer on June 6, 2026 at 6:40 pm

    No, behavior depends on the value of the significant digit (the 3rd digit (the 3) is the significant one in your case, as it is below 5 round and trunc do the same )

    try select trunc(125456.76,-4) from dual (result is 120000) vs select round(125456.76,-4) from dual (result is 130000). Now when the significant digit is 5 (or higher) the results of trunc and round differ.

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

Sidebar

Related Questions

oracle sql: select trunc( sysdate, 'Month') month from dual java: java.sql.Date sqlDate = resultSet.getDate(month);
I have 2 queries in SQL: select trunc(to_date('27-Jul-1987'),'YYYY') FROM dual; and select trunc(to_date('27-Jul-1987'),'RRRR') FROM
select to_timestamp(trunc(state_date) || ' ' || substr(state_time,1,12),'DD-MM-YYYY HH24:MI:SS:FF3') from state_log above statement giving error
select COLLABNAME,DATETIME,TOTALFLOWS,SUCCFLOWS,FAILEDFLOWS from TABLE_NAME WHERE to_date(DATETIME, 'DDMMYYYY HH24:MI') BETWEEN trunc(sysdate-7) AND trunc(sysdate) AND COLLABNAME
So i have this query: SELECT p.*, d.reviews, TRUNC(ds.ratingAvg, 2) as ratingAvg FROM place
Query: SELECT col1 FROM table1 WHERE TRUNC(created_date) = TRUNC(sysdate) If the query take 10
When I do this in oracle 10g: select to_date(trunc(SOMEINPUTdATE)) from table1 where to_date(trunc(date_column_timestamp),'MM/DD/YYYY') >=
I have.... string qString = select e from table where id= :id and trunc(Date)
In the Toad editor, I've got this SQL: SELECT INTERLOPERABCID,AVAILABLEDATE, AVAILABLEQHR,CARPHONEID, TRUNC((AVAILABLEQHR-1)/12) COL, MOD(AVAILABLEQHR-1,12)
Currently I'm using MyTimeStampField-TRUNC(MyTimeStampField) to extract the time part from a timestamp column in

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.