How can I assign the result of a SQL query to a variable? The following code snippet doesn't work: query_result=cur.execute("SELECT column_name FROM table_name WHERE my_variable = 'my_value'",) > Thomas Jollans wrote: > > * get the record you're interested in