Skip to content

Instantly share code, notes, and snippets.

@narenaryan
Last active January 10, 2021 18:31
Show Gist options
  • Select an option

  • Save narenaryan/36098d3e4685a05d6d3a30e45f05cafb to your computer and use it in GitHub Desktop.

Select an option

Save narenaryan/36098d3e4685a05d6d3a30e45f05cafb to your computer and use it in GitHub Desktop.
cursor-illu
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