Question: [![enter image description here](https://i.stack.imgur.com/tU1cZ.png)](https://i.stack.imgur.com/tU1cZ.png)

i'm trying to filter product with their subcategories :
for example : 
if subcategories = (1,3,4)
and if this is subcategory\_product : 

[![enter image description here](https://i.stack.imgur.com/k1T26.png)](https://i.stack.imgur.com/k1T26.png)

how can i get the products with subcategories id=(1,3,4) ??!! plz help
in this case i should get the product with id 62 .

Answer: 
If you are using schemas other than the default `dbo` schema, create a database role per schema and grant `EXECUTE` on the schema to the role.

e.g.
For the default `dbo` schema:

```
CREATE ROLE role_exec_dbo
GO
GRANT EXECUTE ON SCHEMA::dbo to role_exec_dbo
GO

```

For a new schema:

```
CREATE SCHEMA mySchema
GO
CREATE ROLE role_exec_mySchema
GO
GRANT EXECUTE ON SCHEMA::mySchema to role_exec_mySchema
GO

```
None by default.

Create a new role and grant execute to it. This should cover stored procs created in the future as well.