以前从未做过(这是我可能不知道的),
我有两个表格:
Table1:
Column Names: A B C
Rows: 1 sdf sdsd
2 seg werr
以及
Table2:
Column Names: A B C D E F
Rows: 1 sdf sdsd yuj uui ddd
1 sdf sdsd sss sdd ssw
1 sdf sdsd jut scv sef
2 seg werr oel ewe wee
2 seg werr ujf etr wuk
2 seg werr los hjd wee
EDIT:问题发生了变化。
How do I take all rows with the columns that are unique in the 2nd table? I.e. I only want the data from D, E 以及 F where the values in A, B, C in Table1 correspond to the A, B, C values in Table2.
So for instance given A=1 以及 B=sdf, I want the rows:
sdsd yuj uui ddd
sdsd sss sdd ssw
sdsd jut scv sef
我只能去做:从表2WHERE A= 1和B= sdf中选取,但我会收到。
1 sdf sdsd yuj uui ddd
1 sdf sdsd sss sdd ssw
1 sdf sdsd jut scv sef