![]() Ensure that all code and applications that used the function's old name now use the new name.įor more information, see CREATE FUNCTION (Transact-SQL) and DROP FUNCTION (Transact-SQL). To rename a user-defined function using Transact-SQL, you must first delete the existing function, and then re-create it with the new name. This task can't be performed using Transact-SQL statements. ![]() Right-click the function you wish to rename and select Rename. Select the plus sign next to the folder that contains the function you wish to rename: Select the plus sign next to the Programmability folder. I've read on various locations on the Internet that you can set your Maximum Characters Retrieved for XML Data in Tools > Options > Query Results > SQL Server > Results To Grid to Unlimited, and then perform a query such as this: select Convert (xml, Details) from Events where EventID 13920 (Note that the data is column is not XML at all. In Object Explorer, select the plus sign next to the database that contains the function you wish to rename and then To re-create the function, requires CREATE FUNCTION permission in the database and ALTER permission on the schema in which the function is being created. Instead, drop and re-create the stored procedure with its new name.Ĭhanging the name or definition of a user-defined function can cause dependent objects to fail when the objects aren't updated to reflect the changes that have been made to the function.ĭropping the function requires either ALTER permission on the schema to which the function belongs, or CONTROL permission on the function. Therefore, we recommend that you don't rename this object type. Renaming a user-defined function won't change the name of the corresponding object name in the definition column of the sys.sql_modules catalog view. Limitations and restrictionsįunction names must comply with the rules for identifiers. You can only rename user-defined functions in SQL Server by using SQL Server Management Studio. ![]() Applies to: SQL Server Azure SQL Database
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |