How to create a view for a table in Teradata

View creation in Teradata:

View is a logical table that shows the result set of SQL statements. It is used to limit the users to access only few of the columns or values in table. We can add all the FUNCTIONS, WHERE conditions and JOIN operation in the SQL statements while creating the view.

Syntax to create a view:

REPLACE VIEW statement creates a new view, or re-creates the existing view in Teradata. CREATE VIEW statement creates new view only.

Examples of view creation

The use of LOCKING ROW prevents possible deadlocks occurring when two simultaneous primary index SELECTs are followed by an UPDATE, DELETE, or INSERT on the same row.

If you want to create without LOCKING ROW, you can just specify the select query alone after the REPLACE VIEW statement as below.

Recommended Articles