Hi all,
What syntax command should I use so that the user will not allow to insert value if the value is greater than 100 and a msg will be prompted with respect to prof_id. prof_id can appear more than once.
Code:
create trigger percent
before insert on dept_assign
when(select prof_id, sum(dept_assign_percent)
from dept_assign group
by prof_id
having sum(dept_assign_percent) > 100)
begin
<msg>
end;
Please Advise. Thank you very much