Numeric or Alphanumeric datatype
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Numeric or Alphanumeric datatype

  1. #1
    Join Date
    Feb 2006
    Posts
    162

    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

  2. #2
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,333
    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

  3. #3
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    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.
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width