Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我对数据库和使用 sqlite 数据库有点陌生,我将四个表联合起来,然后得到联合后的表,对于每一行,我想找出它最初属于哪个表。有没有一种天真的方法可以做到这一点?
像这样做:
SELECT 'person' AS tablename, * FROM person UNION SELECT 'customer' AS tablename, * FROM customer