I need to run update script on current database (ALTER DATABASE...), but can\'t use implicit its name. Is possible to use some function to get current db name and u
ALTER DATABASE...
Try this
DECLARE @DBName sysname; SET @DBName = (SELECT db_name()); DECLARE @SQL varchar(1000); SET @SQL = 'ALTER DATABASE '+@DBName+' .......'
Raj