Answer the question
In order to leave comments, you need to log in
How to compare data from two tables?
Good evening. In my development I use nodejs and sqlite database. Now that there is a lot of data, I realized that it was ridiculous to implement the selection and comparison of data from tables. Here's a code example:
let table1res = await db.select('select * from table1');
for (let i = 0; i < table1res.length; i++) {
arRes.push({
option1: param,
option2: resto,
});
table2res = await db.select('select * from table2 where ID="tableres.ID"');
for (let j = 0; j < table2res; j++)
/* и пошел второй перебор и сопоставление */
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question