Quantcast
Channel: SCN: Message List - SAP HANA and In-Memory Computing
Viewing all articles
Browse latest Browse all 8968

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 8968

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>