Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Executing a SELECT query with CUBRID Python driver

Here is a simple Python program which executes a SELECT query against a demodb database installed on a localhost.

import CUBRIDdb
conn = CUBRIDdb.connect('CUBRID:localhost:33000:demodb:::', 'dba', '')
cur = conn.cursor()

cur.execute('SELECT * FROM code')

rows = cur.fetchall()
for row in rows:
    print row


To run this program, copy and paste it to a file (eg., then execute the following command:

$ python

comments powered by Disqus
Page info
viewed 1452 times
translations en
posted 2 years ago by
updated 2 years ago by
View revisions
Share this article