Is it possible to programmatically find the database context from a tsql script? ie the context that changes when you add a 开发者_StackOverflowUSE . I ask because I am not using a USE, and would like to find the database name the script is running on.
select db_name()
精彩评论