How can we invoke MySQL stored procedure?

MySQLMySQLi Database

With the help of the CALL statement, we can invoke the MySQL stored procedure. To make it understand we are invoking the allrecords() stored procedure −

mysql> CALL allrecords();
+------+---------+------------+------------+
| id   | Name    | Address    | Subject    |
+------+---------+------------+------------+
| 100  | Aarav   | Delhi      | Computers  |
| 101  | YashPal | Amritsar   | History    |
| 105  | Gaurav  | Jaipur     | Literature |
| 110  | Rahul   | Chandigarh | History    |
+------+---------+------------+------------+
4 rows in set (0.00 sec)
Query OK, 0 rows affected (0.01 sec)
raja
Published on 21-Feb-2018 12:05:46
Advertisements