Hi to all,
I have written one table valued function in one database.
my requirement is ,i want to execute that function in all databases under server/Pc.
i am using sqlserver2008?
can any one help me?
thanks inadvance
How to execute one function in all databses under one server using sqlserver2008?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Syed Nayab Ali33 reputationPosted Sep 14, 2011, 5:22 AM EDT
If you want to use ur function in different database then just mention server name before function name as prefix.
for example:
if ur function exist in sever1 and you want to use it in server2 then just write server1.dbo.function_name in server 2.
Please try it I think it will work
Thanks
Sam HobbsRank #107 · 20.5K reputationPosted Sep 14, 2011, 1:06 PM EDT
SELECT name FROM sys.databases