T-SQL 101: #30 Changing databases with the USE statement in T-SQL

added by DotNetKicks
8/19/2019 3:41:56 PM

1 Kicks, 142 Views

Take a look at the following query: I've asked for a list of the databases from the sys.databases view. But rather than executing it against whichever database I was already connected to, I've said USE master; to change to the master database. The command will be sent to the master database instead of any other ...