I have 2 tables `commands` and `user_access` how c...
# sql
u
I have 2 tables
commands
and
user_access
how can I make a policy so that when selecting from the
commands
column, users will only be able to retrieve the rows that have the same
server_id
value to what has been specified in the
user_access
table linked with their
user_id
. The
commands
table has the columns
id
and
server_id
The
user_access
table has the columns
id
,
user_id
and
server_id