Create Function

The Create Function Tool allows users to create stored functions for a database.

The tool prompts the user to enter the number of parameters that will be contained in the stored function. The user then enters names of each of the parameters. The user also selects the data type of each parameter and the size if applicable. The users also enters the return type for the function.

Once all of the parameter information is entered, the create stored function tool generates the database specific SQL command to create the function in the currently connected database.

The following example is for MS SQL Server:

create function dbo.test_function (
@param1 char(25),
@param2 int,
@param3 datetime
)
RETURNS char
as
--insert function body here

Listed below are the databases for which RazorSQL has a Create Function tool.

DB2 Create Function
Informix Create Function
MySQL Create Function
Oracle Create Function
PostgreSQL Create Function
MS SQL Server Create Function