- Connect to Teradata Database using SQLA or Studio.
- Create the following view of the tables with a condition of a WHERE clause:
/*Create a view*/CREATE VIEW td_cookbookV.EMP_TBL_View AS Select E.EMP_ID, D.EMP_DEPT, D.DEPT_CITY FROM td_cookbook.EMP_TBL_A E inner join td_cookbook.EMP_TBL_B D ON E.EMP_ID=D.EMP_ID Where e.EMP_ID=1032
- Once the view is created, execute the following SELECT on td_cookbookV.EMP_TBL_View to retrieve the rows based on the condition defined:
/*Select on view*/SEL * from td_cookbookV.EMP_TBL_View
- The following would be the result set of the query executed:
- Next, we will REPLACE the view using the ...