Re: VARCHAR vs NUMBER

From: Richard Frazier <rfrazier_at_mailstorm.dot.gov>
Date: 1995/10/26
Message-ID: <46ok6e$h0e_at_news.dot.gov>#1/1


John Strange (jstrange_at_imtn.dsccc.com) wrote:
: You did not indicate the size of the number so I could not
: argue about storage performance in memory.
 

: Number lets you use a sequence generator and makes
: for easy programming.
 

: Think about how you are going to generate a unique num_letter
: value.
 

: Murray Shane (smurray_at_booz.bah.com) wrote:
: :> Q: Is there an advantage in storing a "number" as a NUMBER data
: :> type given that I don't need to
: :> do any mathematical operations on this number field?
 

: :> The scenario I have is this: I want to store a case tracking number
: :> that is currently a NUMBER
: :> data type. What if this were a VARCHAR(x) data type? I could then
: :> use letters and numbers.
 

: :> Is there a performance issue on sorting, finding, etc.?
 

: :> --
: :> --Shane Murray (offsite)
 

: :> *** Make sure to reply to ***
: :> *** smurray_at_booz.bah.com ***

Shane,

Barring the sorting problem noted above, I have found little if any difference in using VARCHAR over NUMBER. In fact, as a developers rule, we have specified that all non-computable fields will be VARCHAR. This aids in identification of field purposes also. The sequential generator may or may not be a problem. We have applications that generate case id codes by simply selecting max(id) +1. The id field is a VARCHAR field and all works fine. Hope this helps, rick.

My opinions are my of course my own, and not those of any other person or organization. Received on Thu Oct 26 1995 - 00:00:00 CET

Original text of this message