Example: SHOW VIEW - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

This example begins with the creation of the view, then progresses to the SHOW VIEW request and finally presents the result of the report request.

     CREATE VIEW staff_info
      (number, name, position, department, gender, dob) AS
       SELECT employee.empno, name, jobtitle, deptno, gender, dob 
       FROM employee
       WHERE jobtitle NOT IN ('Vice Pres', 'Manager') 
       WITH CHECK OPTION;

When you submit the following SHOW VIEW request, the database returns the following view definition.

     SHOW VIEW staff_info;
     CREATE VIEW staff_info 
      (number, name, position, department, gender, dob) AS
     SELECT employee.empno, name, jobtitle, deptno, gender, dob 
     FROM employee
     WHERE jobtitle NOT IN ('Vice Pres', 'Manager') 
     WITH CHECK OPTION;