Hi
I'm pretty green when it comes down to db relationships so please don't be mad at me if this is a dumb question, i swear i spent 2 days searching for some way to do this and i can't find anything useful, even on google.
I have two very simple tables, each has a primary key and a column that references to the other table's primary key (foreign key?). I need this second column to contain one or MORE primary keys of the other table. Something like this:
CREATE TABLE 'table1'
'ID' INTEGER PRIMARY KEY NOT NULL,
'Items' INTEGER REFERENCES 'table2'('ID'),
'Comment' NVARCHAR,
'CreatedOn' DATETIME
CREATE TABLE table2
'ID' INTEGER PRIMARY KEY NOT NULL,
'Object' INTEGER REFERENCES 'table1'('ID'),
'Comment' NVARCHAR,
'CreatedOn' DATETIME
Now i want to insert multiple IDs from table2 into Items of table1, vice versa i want to to be able to have multiple IDs from table1 in the Object column of table2. It was in fact a painful experience searching how to do this, i couldn't find a simple SQL insert statement that would have described how to assign multiple values to a single column. Let alone doing it using DbCommand.Parameters (which i fear, and as far as i could understand, is not possible anyway).
Can anyone be so kind and tell me how to do something of this kind, even using string manipulation? Would be nice if it still could retain some speed for bulk inserting
Thank you very much.