What is the point of accuracy and scale to Type Number?

Version: 11.2

What is the point of having the precision and the SCALE type number? If you create the column with just NUMBER ie.without
specify the precision or scale, you can enter numbers with a precision and scale.


SQL> select * From v$version where rownum < 2;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production


SQL> create table t1 (col1 number);

Table created.

SQL> insert into t1 values (223.9939394);

1 row created.

SQL> insert into t1 values (88.228384);

1 row created.

SQL> insert into t1 values (9.34);

1 row created.

SQL> insert into t1 values (000.00);

1 row created.

SQL> commit;

Commit complete.

SQL> select * from t1;

      COL1
----------
223.993939
 88.228384
      9.34
         0
Do you already have a scenario where a numeric column should store only values with a fixed precision and scale?

Omega-3 wrote:
Version: 11.2

What is the point of having the precision and the SCALE type number? If you create the column with just NUMBER ie.without
specify the precision or scale, you can enter numbers with a precision and scale.

SQL> select * From v$version where rownum < 2;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

SQL> create table t1 (col1 number);

Table created.

SQL> insert into t1 values (223.9939394);

1 row created.

SQL> insert into t1 values (88.228384);

1 row created.

SQL> insert into t1 values (9.34);

1 row created.

SQL> insert into t1 values (000.00);

1 row created.

SQL> commit;

Commit complete.

SQL> select * from t1;

COL1
----------
223.993939
88.228384
9.34
0

Do you already have a scenario where a numeric column should store only values with a fixed precision and scale?

Plenty of needs of the company for specific details and scales.

An age can the persons required to be stored as whole not more 3-digit numbers.
A sum of money may have to be stored with no more than 2 decimal places of accuracy for example the books of GB Pence or US Dollars and Cents
A unit of length may need to be stored in meters with 2 decimals of centimetres
A size may have to be stored with a decimal for half sizes
etc.
etc.

Yes, you can create simply as a generic NUMBER data type, but their design with precision and scale can provide additional information on the limitations for the stored values, especially for things like tools that can use the specified precision and scale to determine how to display the automatically (default) values of reporting.

If you start to question "what is the point?" then you may as well say what's the point of having a NUMBER data type when we can store numbers in a VARCHAR2 data type? or what's the point of having a DATE data type, when we can stored dates as VARCHAR2 data type? etc.

No need to ask such a question because there is almost always a point to these things (and if not what they get deprecated in future versions).

Tags: Database

Similar Questions

  • What is the difference between AXIEM and EMSIght? What are the benefits of AXIEM by EMSight if any?

    I wonder what are the differences between AXIEM and EMSight. Are associated with application? One is better than the other? Please explain.

    AWR estimated AXIEM most powerful plan EM Simulator around.   AXIEM is at the center of continuous research and improvement, while EMSight is only worked on if revealed serious flaws.  Here is a summary of the differences:

    Mesh

    • EMSight must mesh the nearest grid drivers using rectangles.  This causes the mesh to have more elements mesh when there are small and large geometries.  The grid should be small enough to capture the small geometry but then causes large geometries to mesh more.   In addition, angled or curved structures causes inefficiencies mesh.

    • AXIEM STS forms, rather than a grid.  In addition, the mesh can be rectangle or triangle.   This allows a much more efficient mesh.   AXIEM generally have a much more efficient

    • AXIEM contains the ability to process forms to clean geometries that cause inefficiencies of the mesh.  EMSight does not have this feature.

    • AXIEM can forms thick metal mesh, EMSight can not, and user must make approximations when thick metal will change coupling (loss is recorded properly with the thickness of the metal)

    Ports

    • The ports are for the most part similar, but parasites due on AXIEM ports are less.  In addition, the AXIEM has a side wall, thus the effects of not move of the terms of reference of the edge of the line are a lot less AXIEM in.

    • Ports can be added to most any place in geometry with AXIEM.  For EMSight, the ports are usually only added outside the geometry and have limitations to the aircraft on either side of the reference speaker.

    Problem solvers

    • EMSight does not have a low frequency Solver.  Stop low-frequency and then extrapolate to DC.  This usually works well, but you must take into account if the extrapolation is accurate.  AXIEM presents both a low and high frequency Solver so will do better in a low frequencies generally much better in DC.

    • Solver of EMSight scales O (n) ^ 2 for memory and O (n) ^ 3 for the moment.   It has a special algorithm to break the question of memory, but the question of time is the killer.  AXIEM has a direct Solver which scales in the same way and an iterative Solver which will scale O (nlogn).   In other words, AXIEM can solve a lot of bigger problems than EMSight.

    • Several AXIEM processes are multithreaded as EMSight.

    Speaker

    • EMSight is inside a perfect driver side wall.   This works well if you the circuit is in the same cavity.  If not, you must know the rules of them on to the forms of space of the flanks and how that much to extend the port could reference planes.   AXIEM is not here.   AXIEM does not currently have to simulate a perfect driver side wall.

    I don't know that I missed a few aspects of the tools.   From the point of view of the AWR that AXIEM is the tool of choice, except in a few cases have been EMSight may be required.

  • don't play BBC radio, so what's the point of having firefox?

    Summer loving Fox, but what's the point if she will not play radio 4 iplayer etc.? Unfortunately he returned to explore!

    Have you checked that the right version of the Flash plugin is used?

    Start Firefox in Safe Mode to check if one of the extensions (Firefox/Firefox/tools > Modules > Extensions) or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox/Firefox/tools > Modules > appearance).

    • Do NOT click on the reset button on the startup window Mode without failure.
  • What is the point of the current program of recovery iPhone?

    I just got the latest offering from resumption of Apple advertising up to €475 off a new iPhone and frankly think it's an absolute and misleading marketing effluent pot... I can sell my current for more iPhone double Apple are rewarding it and wonder what's the point?

    Come on Apple... It's false, at least give us the same jumps that you give the operators?

    You forget something important here: Apple offers up to 475 Euros. Each phone is evaluated by Apple, and then the price is established.

  • What is the point of groups on bike g

    Hi all, I am new to android this is my first ever smart phone and also of new forums etc, so please be gentle with me. And sorry if this is in the wrong section/place?

    For the last two days, I searched for an app (free of course) which will help me to multi/Group text and messaging multi/group.

    I love my motorcycle G 2nd gen, but these missing tools, contact base are a real let down for me because I need and what I understand, have to manually enter the details to say around time of 20 contacts each wished to text or e-mail, is a good PITA bread, and not always with success.

    This should have been included even on stock android sytems. Even my old Samsung E2600 offered these features!

    Anyway, I've created a group of my 'People' file and cannot do something with it, so what's the point of 'grouping '?

    BTW, I told you that I love my bike and two of my friends came out and I bought one after playing with mine.

    There is an application called 'Contact group' which will give this feature for you. I've used this in the past and it seems to work pretty well. There are other applications like 'DW Contacts and Dialer' which will also give you these features, but you don't have to abandon your application of those default to get the features using this application.

    I'm sure that there are other applications available, but these two are the ones I've personally used and I am prepared to recommend. I hope this helps.

  • What is the difference in coverage and coverage before holes?

    Hi all

    Anyone know what is the difference in coverage and coverage before holes?

    I can find the doc of Cisco is:

    «cover holes are displayed as alarms, coverage before holes are displayed as events»

    "The gaps or the 'holes' in coverage of radio access point are the main cause of poor audio. Detected on the client before hole events coverage provides continuous monitoring to ensure that the customer is informed about the existence of these cover holes. »

    It seems to cover before the hole is detected customer, cover hole is detected AP? However, I'm not sure.

    Another question is what trap includes alarm coverage before hole in the dictionary of alarm and event of WCS 7.0? I can only find several cover traps:

    LRADIF_COVERAGE_PROFILE_FAILED

    LRADIF_COVERAGE_PROFILE_PASSED

    However, two of them have no say if for hole cover or the front cover. Don't know what trap will be sent by the WCS to a notification receiver configured to indicate an event coverage before hole, for example:

    Minor - X - 13: 27:52 16/09/10 cisco-WCS WCS SNMP <$2>0x07 da 09 10 0d 1 b 2 c b 05 2-0 at 00: 10.1.1.12: coverage before hole reported by 00:1f:3 c: cd:c8:2 detected by 10.1.1.12: coverage before hole reported by ' 00:1f:3 c: cd:c8:2 has ' found on the controller

    Your valuable contribution is very much appreciated!

    Hello!

    A front cover is when a client remains for 5 seconds in a coverage hole. In other words, when a customer is heard for a while to wrong signal and is not roaming, it must mean that this area is a coverage hole. This event is informational

    A coverage hole event is when several clients are pasted into the same hole in coverage. Then the AP will increase its power if possible.

    WLC waits for several clients before trigger power avoids crazy behaviors of increasine/reduction/increase/decrease.

    The settings for cover hole events can be configured on the part of MRR of WLC (number of customers, etc...)

    Nothing is configurable for cover before hole because it's just '1 customer only reached the hole in coverage thresholds '.

    Hope that clarifies.

    Nicolas

  • What is the difference between Mutipoint and Multiway video calls?

    What is the difference between Mutipoint and Multiway video calls?

    They are both multi-point calls, however, Multiway is a feature that you can activate with the correct infrastructure and MCU in place, which will allow the ends without a telepresence MCU Office and integrated JabberVideo customers of degenerate transparently a point-to-point call in a multipoint call on the relevant MCU.

    See the relevant Multiway Deployment Guide corresponding to the version of software that you run on your VCS - C for more information; http://www.Cisco.com/c/en/us/support/unified-communications/Telepresence-video-communication-server-VCs/products-installation-and-configuration-guides-list.html

    /Jens

    Please note the answers and score the questions as "answered" as appropriate.

  • Microsoft Solitaire Collection daily challenges - what's the point?

    I downloaded the Microsoft Solitaire Collection, including the part of the daily challenges where the player collects coins and gets badges as price.

    I wonder what is the point of collecting the coins and get badges? I mean, isn't it? Is it the objective in its entirety?

    Hi Jumpin,

    Badges are digital rewards you earn by playing Microsoft Solitaire Collection daily challenges. I suggest you to see the following links for more information on the awards and badges.
    http://rewards.Xbox.com
    http://www.Xbox.com/en-us/live/rewards
    http://support.Xbox.com/en-us/Xbox-360/Xbox-Live/member-loyalty-points

    If you still want to know about premiums and deposits, then I suggest you to the post office.
    http://forums.Xbox.com/xbox_forums/xbox_rewards_support/f/29/t/1599947.aspx

    I hope this helps. Let us know if you have other problems with Windows in the future.

  • What is the use of links and the executable section in a pageDef?

    Hello

    What is the use of links and executable section in a page view definition file.

    I know that we can add different types of links to page with links that are not there in the page what use executable?

    If I click on the icon I get different types of iterators and stocks + green. If the two are even why we we both kept?

    Thank you

    REDA

    Hi Ashish I put in it,

    Now, only I realized the problem is with the lifecycle ADF

    If I place a logging operation in the method of the request form, we will see that the method is called twice and that is why exceptions are thrown. Change the property of refreshment of the invokeAction of prepareModel to renderModelIfNeeded. The commit operation will work with this change and the invokeAction will be called once again because it will be necessary. Once again, the point of the example is to call the invokeAction but for the validation button, as is evident, the value of prepareModel was not enough. The value renderModuleIfNeeded ends the validation operation. .

  • What is the point of this program?

    I just installed it, began to watch the tutorials on it and then work with her to know that it is basically useless in the end.

    I followed the other threads here that State that it doesn't sort capabilities to export your work so that you can develop.

    It's misleading because the exported page.html and boilberplate.css even for something as simple as a layout with 2 breakpoints and only 4 empty div is very imperfect.

    Basically, the exported html and css are not working and I still show the 1620px and the breaking point, even if my screen is 1920px.

    To go back and fix the flawed css makes the process of any model useless.

    I'm missing something here... What is the point of this program?

    So far all I can do is create useless templates which can not go further.

    My attachments show what I see inside reflow and what do I get when I open page.html.

    01.gif02.gif

    I think it is just a demonstration for MAX 2013.

    I played with this for over a year, but there is no update to fix major bugs or requested features.

    Their twitter account is silent for a long time. Not sure if the dev team still exists.

    As you can the proven, this program is not ready for production.

    Adobe Edge reflow anyone? -

  • What is the difference between EPMA and Essbase Studio

    If the two are not used to design applications?

    And a really need Essbase Studio?
    What is the difference between EPMA and Essbase Studio

    ^ ^ ^ It's a little confusing, isn't? As far as I understand the role of EPMA, it is a way to share dimensions and common data between several products Oracle EMP including Planning, Essbase and HFM. In fact, I don't know if other products live in EPMA. What is EPMA not have is a great way to supply or manipulate the dimension and fact tables (or files). Oh, there are tables of the interface, but you will write the code/use the utility of dimension EPMA to load dimensions. I must say that I never tried to load through EPMA data so that someone else will have to pronounce on it. Once the dimensions are built, you can deploy Essbase (and other products) of common and specific to the database dimensions.

    Studio is the tool you will use to go against a data warehouse, or something terribly close a data warehouse to build Essbase databases. Just for Essbase - HFM, planning, etc. are not the targets of the Studio release.

    What gets confusion / intriguing, is that when EPMA deploy Essbase apps, it uses Studio under the covers to do. So the interesting implementations where people use Studio (which is much more flexible than EPMA because it is a development tool as opposed to a dimension/data management application) to read the tables, EPMA interface (and as far as I know, the EPMA base tables) and create Essbase applications like that.

    If you think that there is overlap, I agree with you, but you can see that they are not the same.

    And a really need Essbase Studio?

    ^ ^ ^ Do not use Studio to build Essbase databases. You can go hog wild in EAS with loading SQL rules if you want, even if at some point it will be probably easier and simpler to build in the Studio. Although the Studio has been mentioned as the replacement of EAS for awhile, I suspect the effort required to build a database in Studio will keep around for quite a while EAS or Studio Lite will be out. There is a lot to say (sometimes) for the incredible flexibility EAS/Essbase-Studio requires a more methodical approach and EPMA has a very formal set of standards and methods.

    Phew, I'm sorry, I wrote a book on this subject and I bet you get a lot of differences of opinion on that.

    If you are interested in the Studio, you could do well to take a copy of 'Look smarter than you are with Oracle Essbase Studio 11' of Glenn Schwartzberg. I don't get a penny from the sale while I was among the writers of copy (Hey, I got a mention in the acknowledgements). It's a good book and an excellent introduction to the tool.

    Kind regards

    Cameron Lackpour

  • What's the point of having several columns in the ORDER BY clause?

    DB version: 10 gr 2

    When you use the ORDER BY clause, the lines are always sorted by the first column in the ORDER BY clause. So, what's the point of having several columns in the ORDER BY clause (I always see this in production codes)?

    For the below SQLs' schema SCOTT, result sets are always classified according to the first column ename. When I added use asc and desc of employment, does not change the result set.
    SQL> select * from emp order by ename;
    
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
    ---------- ---------- --------- ---------- --------- ---------- ---------- ----------
          7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
          7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-81       2450                    20
          7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30
          7566 JONES      MANAGER         7839 02-APR-81       2975                    20
          7839 KING       PRESIDENT            17-NOV-81       5000                    20
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
          7934 MILLER     CLERK           7782 23-JAN-82       1300                    20
          7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
          7369 SMITH      CLERK           7902 17-DEC-80        800                    20
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
    
    14 rows selected.
    
    SQL> select * from emp order by ename, job;
    
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
    ---------- ---------- --------- ---------- --------- ---------- ---------- ----------
          7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
          7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-81       2450                    20
          7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30
          7566 JONES      MANAGER         7839 02-APR-81       2975                    20
          7839 KING       PRESIDENT            17-NOV-81       5000                    20
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
          7934 MILLER     CLERK           7782 23-JAN-82       1300                    20
          7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
          7369 SMITH      CLERK           7902 17-DEC-80        800                    20
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
    
    14 rows selected.
    
    SQL>  select * from emp order by ename, job desc;
    
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
    ---------- ---------- --------- ---------- --------- ---------- ---------- ----------
          7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
          7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-81       2450                    20
          7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30
          7566 JONES      MANAGER         7839 02-APR-81       2975                    20
          7839 KING       PRESIDENT            17-NOV-81       5000                    20
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
          7934 MILLER     CLERK           7782 23-JAN-82       1300                    20
          7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
          7369 SMITH      CLERK           7902 17-DEC-80        800                    20
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
    
    14 rows selected.

    Search in this example, you will see the difference

    SQL> create table test_order (name varchar2(10), surname varchar2(10), age number);
    
    Table created.
    
    SQL> insert into test_order values('Kamran','Agayev',26);
    
    1 row created.
    
    SQL> insert into test_order values('Kamran','Taghiyev',26);
    
    1 row created.
    
    SQL> insert into test_order values('John','Kevin',23);
    
    1 row created.
    
    SQL> select * from test_order;
    
    NAME       SURNAME           AGE
    ---------- ---------- ----------
    Kamran     Agayev             26
    Kamran     Taghiyev           26
    John       Kevin              23
    
    SQL> select * from test_order
      2  order by age;
    
    NAME       SURNAME           AGE
    ---------- ---------- ----------
    John       Kevin              23
    Kamran     Agayev             26
    Kamran     Taghiyev           26
    
    SQL> select * from test_order
      2  order by age asc, surname desc;
    
    NAME       SURNAME           AGE
    ---------- ---------- ----------
    John       Kevin              23
    Kamran     Taghiyev           26
    Kamran     Agayev             26
    
    SQL>
    

    When in the second query, I sorted out only for age, you saw it there two 26 years old Keita, there was first Agayev, then Taghiyev. But if I want to get the family names in descending order when there are two very old person, then I will add the second column in the order by clause

    - - - - - - - - - - - - - - - - - - - - -
    Kamran Agayev a. (10g OCP)
    http://kamranagayev.WordPress.com

  • What is the best between Firefox and Aurora?

    What is the best between Firefox and Aurora?

    Hello DarshanK, that depends on what type of user you are probably: https://www.mozilla.org/firefox/channel/

  • What is the difference between extensions and Plugins and Add-ons?

    I'm sorry if here is not the right place for this post.

    What is the difference between extensions and Plugins and Add-ons? Apparantely, they differ in some sense or aspect, but I do not know how. Please, if it is not too complicated, explain in detail and simple language. Thanks in advance to 1 million.

    Kind regards
    Danesh

    Hi Danesh,

    You should take a look at this article for an explanation. Plugins and extensions are essentially types of Add-ons as well as of the characters and themes.

    Hope this helps!

  • What is the Arch of fire and what is its function?

    What is the Arch of fire and what is it ' s function?

    Do you mean FileVault?

    If so, it is a method of encrypting the data on the hard drive to prevent access to the data by others. It is of first importance for mobile devices that take place around with you rather than office devices that tend to stay in a safer environment.

Maybe you are looking for