title: ALTER current database without using its name
body: <p>I need to run update script on current database (<code>ALTER DATABASE...</code>), but can't use implicit its name. Is possible to use some function to get current db name and use inside <code>ALTER DATABASE</code> (Sql Server 2005 and above) ? I tried use <code>db_name()</code>, but doesn't work.</p>
  
  <p><code>select db_name();</code> works</p>
  
  <p><code>ALTER DATABASE db_name() ...</code> doesn't work</p>