title: How to grant access to multiple schemas in one go in SQL Server
body: <p>I'm very green when it comes to the world of database management in SQL Server.</p>
  
  <p>Below is my SQL code to create a login &amp; user &amp; grant permissions</p>
  
  <pre><code>USE TestDb
  GO
  
  CREATE LOGIN [TestLogin] 
         WITH PASSWORD = N'123', DEFAULT_DATABASE = [TestDb], 
         CHECK_EXPIRATION = OFF, CHECK_POLICY = OFF
  GO
  
  CREATE USER SqlUser FOR LOGIN [TestLogin]
  
  GRANT SELECT, INSERT, UPDATE, DELETE ON SCHEMA :: dbo  to SqlUser
  </code></pre>
  
  <p>This runs fine &amp; create user/login. He can access the dbo schema. </p>
  
  <p>But I need to specify multiple schemas in the <code>SCHEMA</code> options. </p>
  
  <p>So I tried :</p>
  
  <pre><code>GRANT SELECT, INSERT, UPDATE, DELETE ON SCHEMA :: [dbo,app]  to SqlUser
  </code></pre>
  
  <p>But I get an error:</p>
  
  <blockquote>
    <p>Cannot find the schema 'dbo;app', because it does not exist or you do not have permission.</p>
  </blockquote>
  
  <p>How can I specify multiple schemas in the above SQL pattern to grant access to the user?</p>
  
  <p>Thanks!</p>