Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
Create View SQL in SAP HANA database
>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_Info
Example
| Id |
EmplName |
Empluser |
Emplpassword |
Joining_Date |
| 1 | Employee 1 |
Emp1 |
Emp1Pwd |
9/11/2016 |
| 2 | Employee 2 |
Emp2 |
Emp2Pwd |
16/08/2015 |
| 3 | Employee 3 |
Emp3 |
Emp3Pwd |
15/09/2016 |
| 4 | Employee 4 |
Emp4 |
Emp4Pwd |
3/07/2014 |
| 5 | Employee 5 |
Emp5 |
Emp5Pwd |
10/09/2012 |
| 6 | Employee 6 |
Emp6 |
Emp6Pwd |
1/10/2013 |
To create a view, which contains only 3 columns you have to write-
>Create View View_EmpInfo As Select Id, EmplName,Joining_Date From Emp_Info;
This view can be used by users to get Id, EmplName, and Joining_date.
Advertisements
