Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
Database Systems - Python Database Programming with Stored Procedure Call Example - APPFICIAL
Play lesson

Database Systems with SQL - Full Course - Database Systems - Python Database Programming with Stored Procedure Call Example - APPFICIAL

5.0 (0)
6 learners

What you'll learn

This course includes

  • 4.5 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

MySQL procedural SQL includes stored procedures, which are stored in the database and can be called by python code with the cursor.callproc() method. The cursor.callproc() method has 2 parameters: the stored procedure name, and a tuple of input that holds the value for each parameter of the stored procedure. An output tuple is returned which has one value for each stored procedure parameter. IN, OUT, or INOUT, in the sttored procedure parameters indicate whether the parameter is for input, output, or both. If you use OUT, the input tuples values are ignored. If you use IN, the value of the output tuple is the input value. In the code shown: movie_count counts the number of R movies. movie_data contains the rating we are trying count and a 0 placeholder for the count parameter. callproc() calls the stored procedure RMovieCount with the input tuple movie_data and returns the output tuple to result. result[1] is the second entry of the result tuple. Subscribe to Appficial for more programming videos coming soon. Also, don't forget to click LIKE and comment on the video if it helped you out!

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

FAQs

Course Hive
Download CourseHive
Keep learning anywhere