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

How to define Autoincrement attribute in .hdbtable

$
0
0

Hi i want to create products.hdbtable

 

create table Query is

 

create column table "ECOM"."PRODUCTS"

         (PRODUCT_ID bigint not null primary key generated by default as IDENTITY,

          PRODUCT_NAME nvarchar(30),

          PRODUCT_DESC nvarchar(100),

          STATUS varchar(1) DEFAULT 'A',

          UNIQUE (PRODUCT_NAME)

          );

 

//HDTABLE

table.schemaName="ECOM";

 

table.tableType = COLUMNSTORE;

 

table.columns = [

{name = "PRODUCT_ID"; sqlType = INTEGER;},  // HOW TO DEFINE (bigint not null primary key generated by default as IDENTITY,)

{name = "PRODUCT_NAME"; sqlType = NVARCHAR;  length = 200;},

{name = "PRODUCT_DESC"; sqlType = VARCHAR; nullable = true;length = 18;},

{name = "STATUS"; sqlType = VARCHAR; nullable = true;}, // HOW TO DEFINE (DEFAULT )

 

];

 

//HOW TO ADD UNIQUE (PRODUCT_NAME)

 

Please help me to convert create sql to hdbtable. If you have any docs for creating hdbtable regarding attributes,Relations please share me.

 

 

Thanks

Kathiresan S


Viewing all articles
Browse latest Browse all 6412

Trending Articles