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

Create table with a primary key constraint

$
0
0

Hello Guys,

 

I am trying to execute a MS SQL query like:

 

CREATE TABLE XYZ

(

  "ROLLNO"          CHAR(2)       NOT NULL,

  "SNO"          CHAR(20)      NOT NULL,

  CONSTRAINT ABC_100 PRIMARY KEY ("ROLLNO", "SNO")

);

 

In Hana DB, but the query fails with following error:

 

Could not execute 'CREATE TABLE XYZ ( "ROLLNO" CHAR(2) NOT NULL, "SNO" CHAR(20) NOT NULL, CONSTRAINT ABC_100 PRIMARY ...' in 3 ms 703 µs . SAP DBTech JDBC: [257] (at 118): sql syntax error: incorrect syntax near "ABC_100": line 5 col 14 (at pos 118)

 

Went through the documentation but not able to figure out correct way to run such a query here. Please help.

 

 

Best regards,

Dhaval


Viewing all articles
Browse latest Browse all 6412

Trending Articles



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