Skip to content

Create Dataset using Stored Procedure

What is Stored Procedure?

User can Store data at location & call it directly from the Query window. User can’t able to see the internal code or query while using this option.

A stored procedure is a schema object that consists of a set of SQL statements and other PL/SQL constructs, grouped together, stored in the database, and run as a unit to solve a specific problem or perform a set of related tasks. Procedures let you combine the ease and flexibility of SQL with the procedural functionality of a structured programming language. Large or complex processing that might require the execution of several SQL statements is moved into stored procedures, and all applications call the procedures only.

Prerequisites

To create dataset by creating Stored Procedure in MySQL. User needs to work with MySQL Workbench.

Mysql-Stored Procedure: This video contains how to Create Simple Stored Procedure in Mysql Workbench.

Follow below steps to create the dataset using storedprocedure

  1. Click on Create Dataset option then the create dataset dialogbox will appear as shown below.

    Image

  2. Enter the details in Create Dataset window as per below:-

  • Name: Demo Dataset (user can select name as per their requirement)
  • Source: Select sakilas from drop-down (user can select the source as per requirements)
  1. The checkbox is placed on the top of the tables list called Stored Procedure ,Select Stored Procedure Checkbox as shown in image below:

    Image

  1. Now user needs to write query to call Stored Procedure from MySQL Workbench.

  2. For this example we used below given query: Query: call check_procedure();

    Image

  3. Now Click on Preview button & user can see the output.

    Image

  4. Click on create button & dataset will be created.