PS HarriJaakkonen :~/Blog/Posts> cat ./how-to-display-only-user-databases-in.html

How to display only user databases in SQL

This is how:

select * from sys.sysdatabases where dbid>4 and not like '$'