cancel
Showing results for 
Search instead for 
Did you mean: 

Primary key columns Integer vs varchar pros and cons

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

lbreddemann
Active Contributor
0 Kudos

Please refine your question. Asking for a general pro/con discussion on a product feature won't yield anything usable.

If you tell us what your application requirements are, then there's at least a chance to discuss it.

- Lars