-
Numeric or Alphanumeric datatype
Hi,
In a table,I've a column named EMPID,now i wants to say making EMPID as Numeric datatype has more advantage than making it as Alphanumeric datatype.I've studied somewhere,there will be improvement in performance by using Numeric type than Alphanumeric type,thats why i'm asking it.
What are the possible reasons can i say for it?
Please anyone help me in clearing this doubt.
Thanks,
Malru
-
if it will only hold numbers, make it a number if it will hold letters or anything else use varchar2 makes sense
otherwise you will end up with data corruption, its nothing to do with performance just common sense
-
there is obviously a fundamental difference between adding numbers and adding numbers formatted as chars. Consider what happens when your sequence moves from 999 to 1000. In the numeric case you are still incrementing, while in the char case you are now adding new values at the beginning. So, you are going to get more block splits with char than number.
Storing values in the wrong data type is very bad practice for a number of other reasons as well, and I just don't get the attraction of it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|