I am using SQL Server 2014
. I need to deny SELECT
permission for a specific user on a set of tables.
I have the following code which will do the job but I need to run it for each relevant table:
USE [MyDatabase]
DENY SELECT ON [mktg_Rating] TO [xxxxx\User]
Assuming I have to deny select permission to a specific user on all tables starting with "mktg_...", how can I re-write the above code to do this in one go?