我正在加入 2 个表,它们都有数百个类似命名的列。我想更改每个表中的所有列名以包含表名。为了使查询简单,我不想显式地调用每个列名。有没有办法将表名附加到所有列名而不显式调用每一列?
例如:
let T1 = datatable (Key:string , Col2:string , Col3:string )[
"1", "b", "c",
"2", "e", "f",
"3", "h", "i"];
let T2 = datatable (Key:string , Col2:string , Col3:string )[
"1", "B", "C",
"2", "E", "F",
"4", "H", "I"];
T1 | join T2 on Key
结果:
Key Col2 Col3 Key1 Col21 Col31
1 b c 1 B C
2 e f 2 E F
期望的结果:
T1.Key T1.Col2 T1.Col3 T2.Key T2.Col2 T2.Col3
1 b c 1 B C
2 e f 2 E F