Calling Stored Procedures
You can execute stored procedures using either the execute() or callproc() method of the connection.
Call Stored Procedures Using the Execute Method
Stored procedures can be called by issuing EXECUTE commands. The stored procedures parameters are parameterized, as in the following example:
cmd = "EXECUTE CreateSchema TableName = ?" params = ["Stories"] conn.execute(cmd, params)
Call Stored Procedures Using the Callproc Method
Rather than using "execute()", one can also use the callproc() method to execute the procedure. The method takes a procedure name and a list of parameters as its arguments:
cur = conn.cursor() params = ["Stories"] cur.callproc("CreateSchema", params)