oracle - PL/SQL Function Logic -


So recently I started experimenting with the database and I'm still new and though I get many examples Functions .. I can not seem to know what is wrong in my argument.

That's why I have a table , which is " Tutorial " and I try to match in the table to match just one row I am convinced that I have corrected the logged user for v_user .. then I think the following code is just logic.

  if v_emp_no! 0 and (tutor_emp_no) = v_user) Select at least tutor_emp_no in v_tutor_emp_no from the tutorial - Employee is a teacher I_tutor: = 1; end if;  

Of course this is not a complete job :)

Any help or advice would be greatly appreciated! :)

** Edit

This is the policy which is a built user who works in the example given under 'sec_admin' which is owned by The company is the tables while my sys role does not work in the user name 'Dummy'

  start dbms_rls.add_policy ('oe', 'enroll' , 'Accesscontrol_enrol', 'sys', 'f_policy_enrol', policy_type = & gt; dbms_rls.context_sensitive); End; /  

Should I change ' oe ' to ' dummy ' or ' sys '? I want that table working for this policy is called Nomination and it is a table that I made my dummy Thanks again via user!

We can not specify SQL inside Statement, then first ask the question and then select if

  maximum (tutor_emp_no) from the tutorial in v_tutor_emp_no, where less (tutor_emp_no) = v_user; If v_emp_no! = 0 and v_tutor_emp_no not faucet - Employee is a teacher I_tutor: = 1; end if;  

If no records are found, then MAX () return is NULL .


Comments