這是我的數據集: 數據集1:合併兩個表的SQL
col2 col3 col4
1 2 3
1 5 6
數據集2:
name2 name3 name4
a b c
d e l
我要合併這兩個表是這樣的:
col2 col3 col4 name2 name3 name4
1 2 3 a b c
1 5 6 d e l
我試過了:
select * from table1 join table2 on true;
但給我:
col2 col3 col4 name2 name3 name4
1 2 3 a b c
1 2 3 d e l
這是不正確的。我怎麼能做到這一點?
這是行不通的。你不能在沒有'over()'的情況下使用窗口函數,並且你不能在這樣的連接條件下使用它們。 –