Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> MySQL

วิธีเรียกใช้ (Invoke) MySQL Stored Procedure

ด้วยความช่วยเหลือของคำสั่ง CALL เราสามารถเรียกใช้ MySQL stored procedure ได้ เพื่อให้เข้าใจ เรากำลังเรียกใช้ stored procedure allrecords()

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)