After creating a user-defined function, use the editor to modify parameters, permissions, or other properties.
PrerequisitesÂ
Be sure the data server that contains the user-defined function is
running, and that you have created and established a connection to the data
server.
-
In Enterprise Explorer, expand the
User Defined Functions folder, right-click the
user-defined function
you want to edit, and select
Edit.
-
Edit the user-defined function
properties.
Editor
tab |
Description |
General |
- Change the Name. Enter a description in the
Comment field.
- Specify Parameters and their corresponding datatypes, input or output status, and defaults. To delete a parameter, highlight
it and click
Delete. To delete all parameters, click
Delete All. Use
Up and
Down to change the order
of parameters listed.
- Select a Return Type.
-
Select With Recompile, if appropriate.
If selected, the stored procedure is recompiled to create a new plan each time the function is first referenced in a SQL statement.
|
Source |
Manually edit the SQL code. To display line numbers for the SQL code, right-click in the left margin, and choose Show Line Numbers.
|
Permissions |
Set permissions for the user-defined function. You can
specify
Granted With Grant Option or Inherited permissions for the listed roles. |
DDL |
View the DDL for the user-defined function (read-only). |
-
Select
from the main menu.
-
Click Save in the Preview Changes window to execute the SQL code and save the changes to the database.
The Preview Changes window appears unless the option is unselected through the Schema Object Editor Configuration preference page.