The above example will work if the database is on the same instance. If you want to extend this further and wish to query from a table from a database that resides on a separate instance, then look up "linked servers" in BOL.
In that case, you can create a linked server and then the view will select from that remote table either by using a four part naming convention or via a passthrough query (openquery/openrowset).