oracle sql
有table1 table2两个表
条件是table1.apply_no = table2.apply_no
怎么取得table1.matter_no
oracle sql
有table1 table2两个表
条件是table1.apply_no = table2.apply_no
怎么取得table1.matter_no
关联查询?
select table1.matter_no from table1 inner join table2 on table1.apply_no = table2.apply_no
要拿到table1表中的matter_no字段,可以这样试着写一下sql:
SELECT table1.matter_no
FROM table1
JOIN table2 ON table1.apply_no = table2.apply_no;
这个sql语句使用了=join on操作符将表1和表2表连接在一起来查询的。
如果以上回答对您有所帮助,点击一下采纳该答案~谢谢