Choose your database:
AnySQL
MySQL
MS SQL Server
PostgreSQL
SQLite
Firebird
Oracle
SQL Anywhere
DB2
MaxDB

Subscribe to our news:
Partners
Testimonials
David Boccabella: "I have really!!!! enjoyed using SQL Maestro for MySQL over the past few months. It has become one of our major development tools for implementing intelligent into MySQL databases".
Joe Rose: "SQL Maestro for MySQL is a great program. I never had any glitch's. It is so easy to use. I made the class work much easier".

More

Add your opinion

SQL Maestro for MySQL online help

Prev Return to chapter overview Next

Create Function Wizard

Create Function Wizard guides you through the process of creating a new Function. See How To create Function for instructions on running this wizard.
 

The basic principles of Create Object Wizards in SQL Maestro for MySQL are explained in a separate topic. Below you will find a description of wizard steps that are unique for the current object.

 

Specify the properties for the new Function according to your needs. The detailed description is given below.
 

 

Specifying Function properties

Name

Specify a name for the function.

 

Owner

Select the owner of the Function from the drop-down list. By default, only the owner of an object can perform various operations with the object. In order to allow other users to operate it, privileges must be granted. (However, users that have the superuser attribute can always access any object.)

 

Comment

Supply a comment to the Function if necessary.

 

Return type

Defines the data type of the function result.

 

 

Data access (Contains SQL, No SQL, Reads SQL, Modifies SQL)

Select the clause to provide information about the nature of data use by the routine.

Contains SQL -

indicates that the routine does not contain statements that read or write data.

No SQL -

indicates that the routine contains no SQL statements.

Reads SQL -

indicates that the routine contains statements that read data, but not statements that write data.

Modifies SQL -

indicates that the routine contains statements that may write data.

These characteristics are advisory only. The server does not use them to constrain what kinds of statements a routine will be allowed to execute.

 

Deterministic

Check the option if the function always produces the same result for the same input parameters, and uncheck otherwise.

 

SQL security

Use the characteristic to specify whether the routine should be executed using the permissions of the user who creates the routine or the user who invokes it. The creator or invoker must have permission to access the database with which the routine is associated. It is necessary to have the EXECUTE privilege to be able to execute the routine. The user that must have this privilege is either the definer or invoker, depending on how the SQL security characteristic is set. The clause was added in MySQL 5.1.8.

 

Managing parameters of a new Function

Use popup menu Add New Parameter... item to add a new parameter and set its properties in Parameter Editor. Use the Edit and Delete items to manage Function parameters.

 

Specifying Function Definition

At this step you can specify the SQL definition for the new function. The step is optional: you can do it later using a non-modal editor.



Prev Return to chapter overview Next