Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 28 Aug 2007 @ 16:32:20 GMT


     
  <Prev Next>   <<First <Prev
Next>
Last>>
 


Subj:   Re: CHAR(1) Vs BYTEINT
 
From:   Michael Larkins

Anony:

Isn't this question sort of like asking: Which is better, the Moon or the Earth?

Does it not depend on what you are doing with it? If you want water and air, I vote for earth. If you want to be able to jump higher, that my money is on the moon. You make no mention of whether you are comparing it to other data, adding it, displaying it or whatever.

If you are adding it, I like the thought expressed earlier of making it DEC(1,0). If you are comparing it to CHAR data somewhere, I don't like the idea of DEC at all. Since everything in a computer is binary at the lowest level, I sort of like byteint. However, this means that you would need a constraint to make sure it never contains a value greater than 9, as opposed to the max value of 127.

What you REALLY want to do is avoid conversions. In other words, define it for the way you use it most often - makes it fastest. So far you have not told us what that is and if you can make the decision on your own from all the previous replies, you probably don't need to tell us - as that sports wear commerical says: Just do it

That is my two cents, for what it is worth.


Michael Larkins
Certified Teradata Master
Certified Teradata SQL Instructor



     
  <Prev Next>   <<First <Prev
Next>
Last>>
 
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023