Last active
January 10, 2021 17:10
-
-
Save narenaryan/1de1de08a62932636e2794736a9c0e0b to your computer and use it in GitHub Desktop.
cursor-illu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def main(): | |
| sql_query = 'SELECT * FROM actor WHERE first_name LIKE %s' | |
| with connect(**config) as conn: | |
| with conn.cursor("actor") as cur: | |
| cur.execute(sql_query, ["John%"]) | |
| res = cur.fetchall() | |
| print("Fetched records: %s" % res) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment