[英]Compare datatype of all the columns of tables with one configuration table in plsql
[英]I Have to compare one table columns with 6 tables
我必须比较 NAME 1, NAME 2, NAME 3, NAME 4, NAME 5, NAME 6 列 FROM TABLE 与表 1 的 Name1,表 2 的名称 2,表 3 的名称3,表 4 的名称 4,表 4 的名称 5表 5,表的名称 6 并获取它们各自的 id 并将它们的名称替换为该表中的 ID
通常,您对主表使用left join
联接:
select
T1.Id1,T2.Id2,T3.Id3,T4.Id4,T5.Id5,T6.Id6
from
Table as central
left join Table1 as T1 on central.[name 1]=T1.[name 1]
left join Table2 as T2 on central.[name 2]=T2.[name 2]
left join Table3 as T3 on central.[name 3]=T3.[name 3]
left join Table4 as T4 on central.[name 4]=T4.[name 4]
left join Table5 as T5 on central.[name 5]=T5.[name 5]
left join Table6 as T6 on central.[name 6]=T6.[name 6]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.