This topic describes how to create, edit, delete, and manage scalar-valued functions from Database Explorer.
1. In Database Explorer, right-click a scalar-valued function or the Scalar-valued Functions node and select New Scalar Function.

2. In a SQL document, fill in the CREATE FUNCTION statement template. For more information, see Scalar-valued Function Designer.
3. In the bottom panel, click Apply Changes.

You can edit a scalar-valued function in one of these ways.
1. In Database Explorer, right-click the function you want to edit and select Modify via SQL.
2. In a SQL document, edit the function.
3. Click Execute.
1. In Database Explorer, right-click the scalar-valued function you want to edit and select Open Editor.
2. In a SQL document, edit the function.
3. In the bottom panel, click Apply Changes.
4. In the dialog that opens, click Continue anyway.
Tip
To prevent the message from appearing again in future operations, select Don’t show this message again.

1. In Database Explorer, right-click the scalar-valued function you want to delete and select Delete, or press Delete.
2. Click Yes to confirm the deletion.
Note
You cannot undo the drop operation, as this action permanently deletes the function definition. To avoid data loss, back up the database before deleting the scalar-valued function.

1. In Database Explorer, right-click the scalar-valued function you want to execute and select Execute.
2. In the View output parameters dialog, enter parameter values.
3. Click Close.
To start debugging a function, select Step Into from the shortcut menu and follow the steps from How to debug a function.
1. In Database Explorer, right-click the required scalar-valued function and select Duplicate Object.
2. In the Duplicate Object dialog, configure the object settings:
3. Click OK.
1. In Database Explorer, right-click the required scalar-valued function and select Generate Script As, then select the statement type.
2. Select one of the following options:
For more information, see Generate the DDL and DML statements for database objects.
To add a scalar-valued function to the database diagram, in Database Explorer, right-click the required function and select Send To > Database Diagram.
To view function properties, in Database Explorer, right-click the function or Functions node and select Show Details.
Object Viewer opens, displaying detailed information about the function.
To update the function to reflect the latest changes, in Database Explorer, right-click the function or Scalar-valued Functions node and select Refresh, or press F5.
To open the Properties pane, in Database Explorer, right-click the scalar-valued function and select Properties, or press F4.
1. In Database Explorer, right-click the Scalar-valued Functions node and select Filter.
2. In the Filter Settings dialog, configure the filter parameters.
3. Click OK.
Note
When you expand the Scalar-valued Functions node, the number of objects it contains appears in parentheses next to the node name. This number changes based on your filter settings.