SAP HANA Cloud - Creating Tables



You can create tabled in SAP HANA Cloud platform and load the data from various sources. Data load can be performed using SQL console option in Database Explorer. Usually two types of Database tables can be created.

  • Physical or logical Tables − You can load and query data as normal DB tables

  • Virtual Tables − These tables usually point to remote sources

Tables can be created at design time using SAP Web IDE and deploy using HANA Deployment infrastructure.

To create table, navigate to HANA Database Explorer and open your SAP HANA database instance. SAP HANA Database Explorer can be opened from "Actions" menu of SAP HANA Cloud instance → Execute SQL and explore Objects.

This will open SAP HANA Database Explorer in a new tab. For first time access, provide Database username and password.

Platform Cockpit

In HANA Database Explorer, you can view the Databases available in your HANA Cloud platform. Each instance has its own Catalog → Navigate to Catalog tab of HANA DB and you can interact with the data in Database or create new tables/schemas or DB views.

Open an SQL console from the HANA Database Explorer by right-clicking on Database instance → Open SQL Console. Below functions can be performed −

To create a schema, you can use CREATE SCHEMA statement −

CREATE SCHEMA TEST1;

To create a table, you can use CREATE TABLE statement −

CREATE COLUMN TABLE TEST1.Test (
   Pincode CHAR(5) PRIMARY KEY, City CHAR (30)
   NOT NULL, Country CHAR(10) NOT NULL);

To insert the data into the tables, you can use INSERT statement −

INSERT INTO Test1.Test VALUES ('12203','Hongkong','JAPAN');
INSERT INTO Test1.Test VALUES ('60601','Chicago','US');
INSERT INTO Test1.Test VALUES ('60615','Delhi','INDIA');
Create Table
Advertisements