Oracle Magazine, May/June 2018
Database Developer OPEN SOURCE cur con cursor person_ age 30 statement select id name age notes from cx_ people where age gt age cur execute statement age person_ age res cur fetchall print res SOME OTHER THINGS YOU COULD TRY Here are some other things to try for retrieving the sample data Join the cx_ people and cx_ pets tables to retrieve people and their pets Retrieve only a persons name and age Change the result order to display the results in descending order Hint If you have trouble getting a query to run in your code try running it in SQL Plus or another database console tool This will help you determine whether the problem is with the query or the code The next article in this series will cover the U in CRUD update Blaine Carter is the Oracle developer advocate for open source He applies his exploratory eye and tinkering inclinations to the intersection of open source software ORACLE MAGAZINE MAY JUNE 2018 87 and Oracle Database NEXT STEPS DOWNLOAD cx_ Oracle GET this articles code examples from GitHub READ Part 1 of this article series
You must have JavaScript enabled to view digital editions.