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.
我有两张桌子。t1 和 t2。我想选择来自 t1 并发生在 t2 中的值。我写的是以下内容:
select col1 from t1, t2 where t1.col1y=t2.col2;
这是搜索价值的正确方法吗?
是的,这行得通,但它是编写连接的旧形式。使用新表格:
select t1.col1 from t1 inner join t2 on t1.col1 = t2.col2