Creating a new table in SAP HANA


New tables can be created using the two methods given below −

  • Using SQL editor
  • Using GUI option

The new table can be created using SQL Create Table statement –

Create column Table Test1 (
   ID INTEGER,
   NAME VARCHAR(10),
   PRIMARY KEY (ID)
);

When you run this SQL query, you get a message like this:

The statement 'Create column Table Test1 (
ID INTEGER, NAME VARCHAR(10), PRIMARY KEY (ID) )'
successfully executed in 5 ms 136 μs (server processing time: 4 ms 432 μs) -
Rows Affected: 0

To create a table using GUI, you need to right-click on any schema name -> New Table

It will open a window to enter the Table name, Choose Schema name from the drop-down, Define Table type from the drop-down list: Column Store or Row Store.

Define data type as shown below. Columns can be added by clicking on the + sign, Primary Key can be chosen by clicking on the cell under Primary key in front of the Column name, Not Null will be active by default. Once columns are added, click on Execute.

Updated on: 18-Jun-2020

1K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements