cancel
Showing results for 
Search instead for 
Did you mean: 

create Counter in HANA table

Former Member
0 Kudos

  Hi Experts,

I have created one table in HANA.

now i want to create counter in the table.

can someone please help how to create counter in the table.

Regards

Raj

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I am not exactly sure what you want want to achieve with a "counter". If you just want to number the lines of the table (based on a certain order?) you can generate the number via the analytic row_number function:

ROW_NUMBER () OVER (ORDER BY <order_by_columns_separated_by_comma>)

Alternatively you can implement a number range based on a SAP HANA sequence.

Former Member
0 Kudos

Hi MArtin,

thanks for the post,

I have achieved this using Sql statement

 

CREATE

SEQUENCE

seq start with

1

;

thanks

Raj