Sunday, 5 July 2015

SQL Query to Create a View in Teradata


Simple SQL query to create a view in Teradata:

CREATE View Employee_V AS
SELECT      Employee_No
FROM Employee_Table ;

- A view we create to restrict access to certain columns
-To restrict access to certain derived columns
-To restrict access to join tables
-To restrict access to certain rows

View is basically in a semantic layer. It supports to Presentation layer. Some time a view can change column names, a view can derive new columns , also aggregate columns.

Simple rules for views:

- A view should not contain Order By
-All aggregate columns must have ALIAS
-All derived column must have ALIAS

No comments:

Post a Comment

Featured post

5 Top Teradata DATE functions to read now

The following are the list of DATE functions. These are very frequently being used in Teradata. The following statement requests the cur...

Popular Posts