Create View SQL in SAP HANA database

SAP ABAP Expert
Published on 21-Feb-2018 19:38:54
>Create View View_name as Select Col1, Col2 From Table_name;In the above SQL statement, you are creating a view that contains Col1 and Col2 from the table.Table Name − Emp_InfoExampleIdEmplNameEmpluserEmplpasswordJoining_Date1Employee 1Emp1Emp1Pwd9/11/20162 Employee 2Emp2 Emp2Pwd   16/08/20153Employee 3Emp3Emp3Pwd15/09/20164Employee 4Emp4   Emp4Pwd  3/07/20145Employee 5Emp5Emp5Pwd10/09/20126Employee 6Emp6  Emp6Pwd   1/10/2013                      ... Read More

Example of creating a database view in SAP HANA

SAP ABAP Expert
Published on 21-Feb-2018 19:36:02
Let us see the below table ARTICLE_LOOKUP, we will create a database view with first 4 columns and will hide Family_NAME and FAMILY_CODE.SQL statement- To create a view on the above table, write down the below SQL statementcreate view view_Articlelookup as select ARTICLE_ID, ARTICLE_LABEL, CATEGORY, SALE_PRICE from "AA_HANA11"."ARTICLE_LOOKUP";This will create ... Read More

Finding a database view in SAP HANA database

SAP ABAP Expert
Published on 21-Feb-2018 19:32:08
This is created under the Current schema in your SQL editor. You can check schema name at the top −In the above snapshot, you can see the current schema name where the view is created. You need to find this schema under the Catalog folder in HANA Studio.

What are single row and multiple row subqueries?

Vikyath Ram
Published on 21-Feb-2018 18:16:33
Single Row Sub QueryA single-row subquery is used when the outer query's results are based on a single, unknown value. Although this query type is formally called "single-row, " the name implies that the query returns multiple columns-but only one row of results. However, a single-row subquery can return only ... Read More

How can we nest a subquery within another subquery?

Swarali Sree
Published on 21-Feb-2018 18:15:40
If a subquery is nested inside another subquery then it is called a nested subquery. To make it understand we are creating the nested subquery from the following tables data −mysql> Select * from Cars; +------+--------------+---------+ | ID   | Name         | Price   | +------+--------------+---------+ ... Read More

What is the concept of a derived table concerned with MySQL subquery?

Sai Subramanyam
Published on 21-Feb-2018 18:09:04
Actually, when a MySQL subquery starts at the FROM clause then the result set produced is referred to as a derived table. Such kind of subqueries that produce derived tables are called materialized subquery. It can be understood with the help of the following example which uses the data from ... Read More

How MySQL evaluates if we use EXISTS operator with a subquery that returns no rows?

Monica Mona
Published on 21-Feb-2018 18:01:06
If a subquery, used with EXIST operator, returns no rows, the expression EXIST returns FALSE and MySQL returns the empty set as output. It can be understood with the help of simple example using the following data from table ‘Customers’ −mysql> Select * from Customers; +-------------+----------+ | Customer_Id | Name ... Read More

How MySQL evaluates if we use EXISTS operator with the subquery that returns NULL?

Chandu yadav
Published on 21-Feb-2018 18:00:49
If a subquery, used with EXIST operator, returns NULL, the expression EXIST NULL returns TRUE and MySQL returns the result based on an outer query. It can be understood with the help of simple example using the following data from table ‘Customers’ −mysql> Select * from Customers; +-------------+----------+ | Customer_Id | Name ... Read More

How can we test for the existence of any record in MySQL subquery?

Rishi Raj
Published on 21-Feb-2018 17:58:45
We can use MySQL EXIST operator to test for the existence of a record in the subquery. In other words, we can say that EXIST operator checks if a subquery returns any rows. The syntax of using EXIST operator with MySQL subquery is as follows −SyntaxWHERE EXISTS (Subquery)The above EXIST ... Read More

In MySQL, how we can write Multiple-line statement?

Nitya Raut
Published on 21-Feb-2018 17:52:37
We can write multiple-line statements because MySQL determines the end of a statement by looking for the termination semicolon, not by looking for the end of the input line.Examplemysql> Select *     -> from     -> stock_item; +------------+-------+----------+ | item_name  | Value | Quantity | +------------+-------+----------+ | Calculator ... Read More
Advertisements