在两个表中进行SQL查询

mar*_*oln 0 python sql

我想知道,是否有可能使sql查询具有与'select products where barcode in table1 = barcode in table2' 相同的功能 .我在python程序中编写此函数.调用该函数后,表是永久连接还是仅在该函数运行时连接?谢谢.

Joe*_*orn 10

SELECT t1.products
FROM [Table1] t1
INNER JOIN [Table2] t2 ON t2.barcode = t1.barcode
Run Code Online (Sandbox Code Playgroud)