Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Datatype and leading zero

558345Mar 29 2008 — edited Mar 31 2008

Hi All,

We will need to store some data values with leading zeros such as "01" on one of the columns for the following table:

SQL> desc dbids_ref.PROD_DMEPOS_FEE_SCHDL_TBL
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 SUPLR_BID_CYC_ID                          NOT NULL NUMBER(2)
 GEO_CBA_ID                                NOT NULL NUMBER(38)
 PROD_CTGRY_CD                             NOT NULL NUMBER(2)
 PROD_DMEPOS_HCPCS_CD                      NOT NULL VARCHAR2(11)
 PROD_MAX_ALWBL_BID_AMT                    NOT NULL NUMBER(11,2)
 SYS_LAST_UPDT_TS                                   TIMESTAMP(6)

The column suplr_bid_cyc_id is the column that will be used to store the data value such as "01", and the datatype is NUMBER(2).

My question is whether or not NUMBER(2) datatype is appropriate for storing this type of data that requires a leading zero. If not, why?

Can someone share your thoughts here?

Your advice is greatly appreciated!

Thank you.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 28 2008
Added on Mar 29 2008
3 comments
1,349 views