title: Dynamic SQL "USE [DB]" not worked
body: <p>I use dynamic sql to create database an tables</p>
  
  <p>this is sql script</p>
  
  <pre><code>DECLARE @DatabaseName VARCHAR(50) = N'test';
  EXECUTE ('CREATE DATABASE [' +@DatabaseName+']');
  EXECUTE('USE ' + @DatabaseName)
  GO
  CREATE SCHEMA [Framework]
  GO
  </code></pre>
  
  <p>the error I get </p>
  
  <pre><code>Msg 2714, Level 16, State 6, Line 1
  There is already an object named 'Framework' in the database.
  Msg 2759, Level 16, State 0, Line 1
  CREATE SCHEMA failed due to previous errors
  </code></pre>
  
  <p>.</p>
  
  <p>this error because   EXECUTE('USE ' + @DatabaseName) not work</p>
  
  <p>I try to use </p>
  
  <pre><code>SET @SQL02  = 'USE ['+ convert(nvarchar(50),@DatabaseName) +']; SELECT DB_NAME();'
  exec sp_executesql @SQL02
  </code></pre>
  
  <p>but not work</p>
  
  <p>what I can do?</p>