Creates or replaces a view on a set of tables or views or both.
REPLACE VIEW redefines an existing view or, if the specified view does not exist, creates a new view with the specified name. Privileges that were granted directly on the original view are retained for the replace view definition.
For information about the temporal forms of CREATE VIEW and REPLACE VIEW, see Teradata Vantage™ - ANSI Temporal Table Support , B035-1186 and Teradata Vantage™ - Temporal Table Support , B035-1182 .
Required Privileges: CREATE VIEW
To create a view, you must have the CREATE VIEW privilege.
The creator receives the DROP VIEW, INSERT, UPDATE, DELETE, and SELECT privileges on the newly created view WITH GRANT OPTION.
If a user other than the owner accesses a view, then all of the relevant privileges needed by the immediate owner of the view to access underlying tables and views must also be held by the immediate owner of the view WITH GRANT OPTION.
You must have the following privileges to update a table through a view.
User | Privileges Required |
---|---|
Immediate owner of view |
|
Other users |
|
You must have the following privileges to delete rows from a table through a view:
User | Privileges Required |
---|---|
Immediate owner of view |
|
Other users |
|
You must have the following privileges to update or delete rows from a table using a search condition through a view:
User | Privileges Required |
---|---|
Immediate owner of view |
|
Other users |
|
Required Privileges: REPLACE VIEW
- DROP VIEW privilege.
- CREATE VIEW privilege if the specified view does not exist.
Privileges Granted Automatically
- DELETE
- DROP VIEW
- GRANT
- INSERT
- SELECT
- UPDATE