Creating stored procedures from the Database Explorer

You can use SQL Editor or the Routine Editor to create stored procedures.
Prerequisites:

Routine development is not supported for every available data source. See Stored procedure and user-defined function support by server type for details.

Using the SQL Editor, you can create a stored procedure based on a template, and modify the template as needed. This method is useful if you want to quickly create a stored procedure and run it on the server.

Using the Routine Editor, you can specify the name and language for a stored procedure and then open the source code in the Routine editor for further modification. When you create a stored procedure using this method, you must specify a data development project to store the source code for the stored procedure. You can specify an existing project that is associated with the connection that you are using, or you can create a new project.

To create a stored procedure from the Server Explorer:

  1. Switch to the Data perspective.
  2. In the Database Explorer, right-click the Stored Procedures folder under a database connection, and click one of the following menu items:
    • Click New > With SQL Editor to open a stored procedure template in the SQL Editor.
    • Click New > With Routine Editor to open a window so that you can specify a name, language, and data development project for the stored procedure, then click Finish.
    If you use the SQL Editor, you can modify the template and run the stored procedure from the SQL editor view to deploy the stored procedure to the database. If you use the Routine Editor, the stored procedure is added to the Stored Procedures folder in the data development project that you specified, and the stored procedure opens in the routine editor.

Feedback