Re: Use of Datatype
What Peter said in the other response is correct. The simple thing to do is simply not use a display length element for those column definitions.
Here's an easy easy story to understand why:
Let's say you defined a column as INT(5). It's an INT so the value 12345678 is a legal value. If you only have 5 spots for the display, which of those 5 digits do you choose? Should the output be "12345" or "45678"? Both of those options fit the (5) that was listed in the definition but both would still be wrong. The only logical choice is to ignore any length description in the definition and show the entire value. Since we are going to ignore it, anyway, then we don't even need it in the first place.
Historically, this kind of length restriction in a table's definition had some moderate value. It could keep a single row within the useful limits of a punched card or terminal screen. We haven't had display limits like that in decades.
Subject
Written By
Posted
Re: Use of Datatype
April 08, 2022 02:44PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.