what is ::fn()? | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

what is ::fn()?

i see some function names starting with :: (e.g. ::fn_virtualfilestats(1,1)) – what do they mean actually? Thanks,
Ram "It is easy to write code for a spec and walk in water, provided, both are freezed…"
When the UDF returns a table, instead of a scalar value, you have to add the two colons in front of the UDF name, or in front of the owner prefix if it is mentioned.
quote:Originally posted by ramkumar.mu i see some function names starting with :: (e.g. ::fn_virtualfilestats(1,1)) – what do they mean actually?

To call a system supplied UDF, you should use this syntax. These functions reside in the master database. ALL system supplied UDFs are table valued udfs. Scalar valued system functions are not implemented as UDFs. You DONT have to use the :: syntax to call a table valued UDF that you have created in your database. Roji. P. Thomas
Microsoft SQL Server MVP
http://toponewithties.blogspot.com

Hmm… interesting. Thanks Roji Thanks,
Ram "It is easy to write code for a spec and walk in water, provided, both are freezed…"
]]>