Rashmi Pandit
Rashmi Pandit

Reputation: 23848

SQL Server UDF refresh

I have altered the column datatype in one of my tables from int to decimal.

I have a UDF referencing the columns of this table.

How can I ensure my UDF returns decimals rather than int without having to re-create it?

(For view, I know we can use sp_refreshview, not sure about UDF).

Thanks, Rashmi

Upvotes: 5

Views: 507

Answers (1)

Martin Smith
Martin Smith

Reputation: 453727

I assume you are talking about an inline TVF in which case you can use

EXEC sp_refreshsqlmodule 'YourTVF'

Upvotes: 7

Related Questions