En-Motion
En-Motion

Reputation: 919

Debug Executed Sql in Python

I am executing some sql in python as follows

statement = "select * from TEST_TABLE"
debug("Statement: %s" % (statement, ))
cursor = gblDBConnection.cursor()
cursor.execute(statement)

I can debug the statement using a debug function I have written but would also like to debug the actual values returned ie after sql execution.

Is there a way of doing this?

Upvotes: 0

Views: 685

Answers (1)

Fabian
Fabian

Reputation: 4348

statement = "select * from TEST_TABLE"
cursor = gblDBConnection.cursor()
values = cursor.execute(statement)
debug(values)

?

Upvotes: 1

Related Questions