for example:
USE pubs
GO
/* Now is there a T-SQL statement to return which databasename I am currently using, i.e. this would return 'pubs' in this situation
*/
-- and I do
USE Northwind
go
-- run the same T-SQL and it should return 'Northwind'.
is this possible? any answers would be appreciated.
thank you.