Skip to Content

We have seen how to create a system on HANA Studio and how to create a user on SAP HANA Data Base in my previous blog.

Now we are discussing about How to create a table on SAP HANA 1.0 Data Base and about types of tables.

We have 3 types of tables:

  • Row based
  • Column based
  • Table type

Row Based

This is similar to traditional row based relational data base table. Major difference between traditional data base to In Memory data base is, Data always is maintained in RAM.Data is stored and retrieved row based.This technique is aquired from P*time In-Memory data base system which was acquired by SAP in 2005.

Column based

Data is stored in column wise in data base. This is originated from TREX (Text Retrieval and Information Extraction) technology.

Table Type

This type of data is stored ion disk and only retrieved when it is required. When we don’t want to use the data for a long period of time and very rarely accessed or not needed any more,then we can keep maintain the data in this table.

Steps to Create a table

To create a table, initially we need to have SCHEMA, which is collection of Column views, Procedure, Tables and Views. We can compare this with Info Area from BW System to easily understand.

Now let us start with HANA Studio to create a Schema. Create a schema using SQL Editor as shown in the given below screen shot.


As soon as we selected SQL Editor, we get the below screen and write a syntax to create a schema.

Syntax: create schema <Schema_Name>

2. schema.jpg

Execute the SQL Query using Deploy Button from right side corner.As soon as we execute the query, it will display the status information.

3. schema error.jpg

Correct the Error and execute it again.

4. schema success msg.jpg

So far, we could able to create schema successfully. Please refresh the Catalog menu to view created Schema.

5.Refresh to reflect schema.jpg

As soon as it is refreshed, we can see the created table in our CBR_PRJ Schema.

6.schema created.jpg

Now, Let us start creating a table on schema SBR_PRJ. select scehma -> select Tables folder -> Select New table.

7.create table.jpg

As we discussed earlier, we have 3 types of tables. By default system will create Column store data base.

8.Table name and type.jpg

Add your fields to data base as shown given below. here we need to provide field name, data type, size, default values and primary key.

9.provide field information.jpg

We can check the table in the table space as shown given below.

10.table created information.jpg

Now using SQL statement we can create entries for CBR_EMP_DETAILS table.

11.Export Sql.jpg

We can check the below SQL statement which has been created by system. We can also create a table using SQL statement.

Syntax: Create column table “schema_name”.”table_name” ( Filed1 datatype (size),  Filed2 data type (size) …. Primary key (Filed name) );

table sql statement.jpg

Now we need to create entries into the table CBR_EMP_DETAILS, for this we have another beautiful option.

i.e. Insert Statement as shown here, system will automatically create the insert statement to create table entries.

Insert Statement.jpg

As soon as we select the insert statement, system will create the insert statement as shown given below.

12.Generate Insert Statment.jpg

13.Insert statement.jpg

Here we can also create multiple entries as shown given below.

  14.multiple entries.jpg

We have created a table and table entries in CBR_EMP_DETAILS . Now we can see another beautiful option which has been provided by SAP HANA.

Select table -> open data preview to view table content.

17.Data Preview.jpg

We have 3 options to view the content which is there in table.

  • Raw Data
  • Distinct Values
  • Analysis

18.Raw Data.jpg

We can also check the distinct values using distinct values tab option as shown below.

19.statistical data.jpg

last option is Analysis tab, which is more useful to view data in different types options like table format or chart format.

20. Charts.jpg

So far, we have seen how t create a schema,table and how to see the table content in different formats.

I will keep you update with latest blogs on HANA. 🙂

I would be very happy to see your comments and suggestions.

Thanks & Regards,

Ravi K Chandragiri

To report this post you need to login first.


You must be Logged on to comment or reply to a post.

Leave a Reply