Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8944

Primary key columns Integer vs varchar pros and cons

$
0
0

Hi Friends,

 

 

 

I want to know which data type was best to choose for assigning Primary Keys.

 

 

If we choose INT as a data type by default it takes 32 bits (4 bytes) in Hana.

 

For even small values like 2,33,55 also  i know that it takes 4 bytes only.

 

 

Kindly tell me the advantages  & disadvantages of INTEGER over VARCHAR when  use a column as a primary key.

 

Also tell me the advantages & disadvantages of VARCHAR over INTEGER when we assigning VARCHAR as a primary key.

Please Ellaborate

 

 

 

Regards

 

Nagarjuna


Viewing all articles
Browse latest Browse all 8944

Trending Articles