I need to know the ID of newly created record, but this record has unique field:
CREATE TABLE materials (
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
name TEXT,
color_id INTEGER,
count INTEGER);
CREATE TABLE colors (
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
name TEXT UNIQUE ON CONFLICT IGNORE);
I'm using simple TextBox, to set color, I want it to be inserted and then receive it's id. How can I do this?