I am trying to give users different grants into a database. I Know how to do this graphically in SQL Server 2008, but how can I do this with SQL code.
I know to do this for a table for example
GRANT SELECT, INSERT, UPDATE ON dbo.YourTable TO YourUserName
But how to make this not only for one table but for the entire DB. I have tried it like above with the name of database , but it does not function....How can I do this? Please help me?