Skip to content

Easy table transpose in hive

I need to transpose my table. Now i have that type of table: But i want to get the next result How should i transpose my table for achieving this result? Answer Use case statements with min() or max() aggregation:

Why we need a primary key?

I am reading about primary keys and at a lot of tutorials, technical blogs etc., and I found that a primary key cannot be null. I think it’s totally wrong because I was able to insert null value in the column. I suppose a primary key can have a not null value only if the column is declared as not