I recently discovered that you can create table functions in Azure Synapse, but they are NOT listed in SSMS. Also, even if you know the function's name, you can't use sp_helptext to find out what it does.
So how can we find them or find out their definitions if we know someone created some functions?
Here's the query you need to pull from system tables:
SELECT s.name
,o.name
,DEFINITION
,type
FROM sys.sql_modules AS m
JOIN sys.objects AS o
ON m.object_id = o.object_id
JOIN sys.schemas AS s
ON o.schema_id = s.schema_id
WHERE o.type IN ('IF','FN');
GO
Have fun with Azure Synapse!
No comments:
Post a Comment