• For those that have html tags inside the question (I'm using Chrome), the question shows up properly in the email... and I posted it below:

    use master

    go

    create database testdb

    go

    create proc sp_test as

    select db_name()

    go

    sp_test

    go

    use testdb

    go

    sp_test

    go

    use master

    go

    drop database testdb

    drop proc sp_test

    go

    - Jeff