title: How to query Intersystems Caché for a list of namespaces, databases, and tables?
body: <p>I need to obtain a list of namespaces, databases, and tables in Caché so I can loop through each and query various things (like row counts). </p>
  
  <p>I've seen <b><a href="https://stackoverflow.com/questions/12823127/how-to-obtain-a-list-of-schemas-in-intersystems-cache">this</a></b>, but it only lists the databases within the %SYS namespace. </p>
  
  <p>I know I can use <code>LIST^%NSP</code> in the terminal to obtain a list of namespaces, but it has extra text ("Here are the defined namespaces:") that I don't want to have to parse. Plus, I really would like to stick to SQL queries if possible.</p>
  
  <p>Thanks</p>