ALTER TABLE <table> ADD FILTER [<Filter_Name>] (<condition>);
The table you want to add a filter on
You can define a filter name
when a user doesn't define any filter name, the default name is <table><#> where <#> is the next available filter number (starting at 0)
Condition using only the table into account
Use a where clause condition : WHERE ColumnX = ValueX
ALTER TABLE my_test ADD FILTER ( WHERE ival > 20);
ALTER TABLE my_test ADD FILTER ( WHERE authorized_User = current_user);
Filtering using an extra table (with a JOIN)
INNER JOIN myschema.TableY ON (Join conditions)
Even if the syntax is correct, for performance reasons, it is recommended not to use any "where clause" in that context. Prefer including all conditions into the ON clause.
For performance reasons, it is highly recommended to create the table used in the JOIN clause as a dimension table.
ALTER TABLE my_test ADD FILTER ( JOIN filter_table on (my_test.entity= filter_table.entity AND current_user = filter_table.manager) );
This SQL command does not return anything