我的桌子有三列.其中一列[ Col3]具有多个值.所以,当我在桌面上做一个select命令时:
Select col1, col2, col3 from MyTable
Run Code Online (Sandbox Code Playgroud)
它给了我以下结果:
Col1 Col2 Col3
------------------------------
Row 1 430 A319 N1160 N1336
Row 2 abc efg G3489 M5678 N5643
Run Code Online (Sandbox Code Playgroud)
如果有任何方法可以获得输出:
Col1 Col2 Col3
------------------------------
Row 1 430 A319 N1160
Row 2 430 A319 N1336
Row 3 abc efg G3489
Row 4 abc efg M5678
Row 5 abc efg N5643
Run Code Online (Sandbox Code Playgroud)
就像列有多个值一样,然后会显示与列中每个值对应的新行,其他列应包含重复的数据.
我希望我对这个问题很清楚.