title: SQL Server sys.databases vs sysdatabases?
body: <p>I have a query which I am using to list databases:</p>
  
  <pre><code>SELECT * FROM sys.databases
  </code></pre>
  
  <p>But this query does not work in SQL Server 2000.</p>
  
  <p>The following query works in both SQL Server 2000 and above:</p>
  
  <pre><code>SELECT NAME FROM sysdatabases;
  </code></pre>
  
  <p>I've found <a href="http://www.sqlservergeeks.com/sql-server-sys-databases-vs-sys-sysdatabases/" rel="noreferrer">this article</a> which has some notes on <code>sys.database</code> (and also specified that sysdatabases has been kept around for compatibility reasons).</p>
  
  <p>What I'm wondering, is if there is any reasons I should NOT use <code>sysdatabases</code> to get a list of database names? I haven't seen anything anywhere other than using the <code>sys.databases</code> is the newer style.</p>