I have created this in mysql
CREATE VIEW MYVIEW AS (
SELECT A.FNAME
, A.LNAME
, B.EMAIL
FROM EMPLOYEE A, EMPEMAIL B
WHERE A.EID = :empId
AND A.EID = B.EID
AND B.EMAILTYP = :emailType)
now i want make " empId " and " emailType " dynamic.I mean pass the value at select time. what need to change in code?? thanx in advance
Just create the view without the parameters (i.e., to take care of the join only):
And apply the dynamic parameters when you query:
You can use this solution with a function -
Using example: