Last post Jul 19, 2014 01:55 PM by Lannie
Jul 19, 2014 07:28 AM|priya15_patel|LINK
i have a function in oracle that returns multiple rows and it accepts EmpCode. now i want to create view which comprises of function data and
all details from EmpMaster how can i create such a view ?
Jul 19, 2014 01:55 PM|Lannie|LINK
CREATE OR REPLACE VIEW vw_MYDATA
INNER JOIN TABLE2 b on a.PRIMARY_KEY = b.FOREIGN_KEY
Foreign key being the one to many values related to the primary key, in this case your EMP_CODE.
Yes, when I create data applications, I never show data from the base or raw data table, I always create views and only GRANT SELECT on the VIEW to data users to isolate my data tables from the users as one layer of security and data integrity. VIEW also
allow you to do dynamic things as well, like JOIN tables, transform data for presentation purposes, and apply dynamic filters to certain columns derived from the user interface. One view... many uses!!