1

Is it possible to extract columns from two different database in sqlite3?

My problem is, I have two tables in two different database and I want to retrieve columns from tables from these two database.

To make it more clear, here is my pseudocode.

"SELECT Table_FromFirstDatabase.product 
 FROM MyFirstDatabase.Table_FromFirstDatabase
 WHERE   product NOT IN ('SELECT  Table_FromSecondDatabase.product 
                        FROM MySecondDatabase.Table_FromSecondDatabase');"

Is it possible to do something like this in sqlite3 ??

Thank you....

2 Answers 2

1

You can do that:

ATTACH statements in SQLite.

Note that you could probably use SELECT t1.product FROM db1.tbl1 AS t1 EXCEPT (other select statement) instead of WHERE NOT IN

Sign up to request clarification or add additional context in comments.

Comments

0

No. It's probably better for you to pull the data in a local list/array anyways.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.