I have a table in SQLite that is linked to a main table using: integer references
. When I add rows to that table, should I give it a value, or should I just keep it null
?
Here is my table:
CREATE TABLE table1(
id integer PRIMARY KEY,
firstCollumn text,
);
CREATE TABLE table2(
id integer PRIMARY KEY,
firstColumn text,
tableID integer references table1(id)
);
When I gave it a null
value, and I later tried retrieving it, it gave me problems.
If I'm not supposed to give it a null, then how do I know what value to give it?
Aucun commentaire:
Enregistrer un commentaire