SQL Server

Tips and Techniques

Change your default database


sp_defaultdb [ @loginame = ] 'login', [ @defdb = ] 'database'

Note: the above has been deprecated in favor of the ALTER LOGIN statement in SQL Server 2005.

Did you know?

UDF's and temporary tables

SQL Server 2000 UDFs can't access temporary tables.