Last active
January 10, 2021 18:31
-
-
Save narenaryan/36098d3e4685a05d6d3a30e45f05cafb 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
| with connect(**config) as conn: | |
| with conn.cursor() as cur: | |
| cur.execute(sql_query, ["John%"]) | |
| res = [row for row in cur.fetchone()] | |
| # You only get one row at max |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment