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!

Create flag column using varchar2(1) or number datatype

Badam123Dec 4 2017 — edited Dec 4 2017

We are planning to create a new Column : is_Active in our new table which says whether  record is active or not .The values are 'Y' for active , 'N' for inactive and null when nothing is selected.

we got some suggestion for creating the column with number datatype instead of varchar2 , where 1 for active , 0 for inactive and null .

The reason being that the varchar column needs to be set to lower case or upper case in the code (procedure/package/javacalls etc )to be consistent and the same problem will not arise with number datatype.

My question is whether the suggestion of going with number datatype is good approach ?  (I feel that it becomes difficult for others to understand )

Pls suggest.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 1 2018
Added on Dec 4 2017
13 comments
2,519 views