If you are able to use triggers, then yes, it is very straightforward to limit value choices to contents of a VIEW. I can propose trigger code for you if you post:
1) the name of the trigger table.
2) the column names from the VIEW that:
a) match to columns from the trigger table.
b) contain the valid values.
3) the maximum number of valid values from the VIEW.
create trigger tri_bi_compras_desc
BEFORE INSERT
ON compras-desc
FOR EACH ROW
BEGIN
.....
.....
END;
Notes:
the field name is descricao and the view(that as just a column with the values) is called produtos_animais
Maximum number of valid values is for example 10.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.