I have SQL command something like this:
DEFINE item_id_variable
BEGIN
INSERT INTO items (name, value, status)
VALUES (myname, myvalue, mystatus)
RETURNING item_id INTO item_id_variable;
The table has auto-incrementing attribute item_id and it's value for the row I just added is in the item_id_variable. I trigger this with cursor.execute() and it works ok, but I need to read the value of "item_id_variable" into a python variable, so I can pass it further in the code. How do I do that??