ethar turky
asked on
execute alter on another database
Dear all ,
Need to execute
I try to use :
btw, I have [testTable], ColName in both database and all necessary permissions...
Also I don't want to use "USE" keyword.
thanks in advance.
Need to execute
alter [testTable] drop column ColName ;
which is belong to [Test2DB] while I am in context of [Master1DB].I try to use :
alter [Test2DB].[testTable] drop column ColName ;
andalter [Test2DB].[dbo].[testTable] drop column ColName ;
btw, I have [testTable], ColName in both database and all necessary permissions...
Also I don't want to use "USE" keyword.
thanks in advance.
ASKER
yes I try as written above and I got the error:
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'Test2DB'.
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'Test2DB'.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ALTER TABLE [Test2DB].[dbo].[testTable ] DROP COLUMN ColName ;
alter [Test2DB].[dbo].[testTable
Did you try?