SQL Server administration and T-SQL development, Web Programming with ASP.NET, HTML5 and Javascript, Windows Phone 8 app development, SAP Smartforms and ABAP Programming, Windows 7, Visual Studio and MS Office software SAP ABAP Programming and HANA Database Tutorials
Development resources, articles, tutorials, code samples and tools and downloads for ASP.Net, SQL Server, R Script, Windows, Windows Phone, AWS, SAP HANA and ABAP, like SAP UI5, Screen Personas, etc.




Install SAP Free


Cannot Create Row Table Having Identity Column on HANA Database

SAP HANA database developers can not create row table with identity column since this feature is not supported. SQLScript programmers can create identity column only in a column table.

Following CREATE TABLE command (DDS: Data Definition Statement) intends to create a row table having an identity column ID

CREATE TABLE Users (
 UserId int generated by default as identity(start with 1 increment by 1) NOT NULL,
 UserName nvarchar(50) NOT NULL
);

Execution of above SQL command on HANA database results with following exception:

Could not execute 'CREATE TABLE Users ( UserId int generated by default as identity(start with 1 increment by 1) NOT ...'
SAP DBTech JDBC: [7]: feature not supported: cannot create row table having identity column: USERID: line 2 col 2 (at pos 23)

If HANA databaseSQL programmer changes the Row Table type to Column Table type using CREATE COLUMN TABLE syntax, table creation will be completed successfully

CREATE COLUMN TABLE Users (
 UserId int generated by default as identity(start with 1 increment by 1) NOT NULL,
 UserName nvarchar(50) NOT NULL
);

So as we understand from this error row tables don't support identity columns or columns generated as identity. However, column tables can be easily created with identity columns.






SAP Tutorials

SAP Tutorial

SAP Forums

SAP Tools

SAP Transaction Codes Table


Meetup Sunumu 1 meetup






Copyright © 2004 - 2019 Eralper YILMAZ. All rights reserved.
Community Server by Telligent Systems