Python and PL/SQL

Gerhard Häring gh at ghaering.de
Mon Nov 7 15:11:59 CET 2005


vb_bv wrote:
> Does Pyton PL/SQL programming language of Oracle support?

Python supports calling Oracle PL/SQL procedures. Here's an example 
using the cx_Oracle database adapter:

 >>> import cx_Oracle
 >>> con = cx_Oracle.connect("outlinetest/soca at soca_tsn")
 >>> cur = con.cursor()
 >>> cur.execute("""
... BEGIN
...   PKG_Test.Test;
... END;
... """)

cx_Oracle also works with all types I needed, including passing ARRAYs 
to stored procedures, and getting REFCURSORs back.

-- Gerhard




More information about the Python-list mailing list