Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

What is the best way to implement the autoincrementation of primary key in HANA table?

$
0
0

Hi,

 

I'm new in SAP HANA and I can't find any information about how can I get an auto incremented field in HANA table.

What I'am looking for is something like this:

 

CREATE TABLE T (ID INTEGER NOT NULL AUTO_INCREMENT, ....);

 

In SAP HANA SQL reference there are no such keywords as AUTO_INCREMENT, SERIAL, IDENTITY etc.

 

For now the only reasonable way I can think of is using of sequence, but I'd like to avoid

another SQL request just to get next sequence value.

Please, tell me what is the best way to obtain next unique value for primary key field?

 

regards

Marcin Pancewicz


Viewing all articles
Browse latest Browse all 6412

Trending Articles



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