Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

phpMyAdmin Stored Procedure Explanation

I have found the following option screen when creating a Stored Procedure in phpMyAdmin.

pma

Now I wonder what everything means.

I know the Routine name, Type, Parameters, Definition, Definer, Security type and Comment options.

I however do not know what to do with Is deterministic and SQL data access. I have tried to Google it, but couldn't find it. Can someone enlighten me what those values mean?

like image 315
skiwi Avatar asked Nov 29 '13 13:11

skiwi


People also ask

How to pass parameters to the stored procedure in phpMyAdmin?

You can pass parameters to the stored procedure to get data based on Dynamic values. Step -1 : Open PHP My Admin and select the database to create stored procedure Step -2 : Go to Routines menu & Click on Add routine. Step -3 : By Clicking on Add Routine Link, PHPMyAdmin will open Pop-up.

How to create stored procedure in PHP?

A stored procedure is a prepared SQL code that you can save, so the code can be reused over and over again. You can pass parameters to the stored procedure to get data based on Dynamic values. Step -1 : Open PHP My Admin and select the database to create stored procedure Step -2 : Go to Routines menu & Click on Add routine.

Which statement is used to execute a stored procedure in MySQL?

The CALL SQL statement is used to execute a stored procedure. Parameter. Stored procedures can have IN, INOUT and OUT parameters, depending on the MySQL version. The mysqli interface has no special notion for the different kinds of parameters.

How to run stored procedures in postphp myadmin?

PHP MyAdmin will display list of created Stored Procedures. Click on Execute link to Run Specific Stored Procedure. Procedure without parameters will directly Run Query and list out the data Procedure parameters will open Pop up to add parameters, then Run Procedure and get result data.


1 Answers

IS DETERMINISTIC:

A procedure or function is considered “deterministic” if it always produces the same result for the same input parameters, and “not deterministic” otherwise. If neither DETERMINISTIC nor NOT DETERMINISTIC is given in the routine definition, the default is NOT DETERMINISTIC.

SQL DATA ACCESS:

  • CONTAINS SQL indicates that the routine does not contain statements that read or write data. This is the default if none of these characteristics is given explicitly. Examples of such statements are SET @x = 1 or DO RELEASE_LOCK('abc'), which execute but neither read nor write data.

  • NO SQL indicates that the routine contains no SQL statements.

  • READS SQL DATA indicates that the routine contains statements that read data (for example, SELECT), but not statements that write data.

  • MODIFIES SQL DATA indicates that the routine contains statements that may write data (for example, INSERT or DELETE).

like image 197
rtribaldos Avatar answered Sep 22 '22 02:09

rtribaldos