Using the SQL Editor, you can create a user-defined function based on a template, and modify the template as needed. This method is useful if you want to quickly create a user-defined function and run it on the server.
Using the Routine Editor, you can specify the name and language for a user-defined function and then open the source code in the Routine editor for further modification. When you create a user-defined function using this method, you must specify a data development project to store the source code for the user-defined function. You can specify an existing project that is associated with the connection you are working in, or you can create a new project.
To create a user-defined function from the Database Explorer: