这个问题听起来令人困惑,但看看:
这样我们就可以获得第一列(col1):
select distinct maker
from product
Run Code Online (Sandbox Code Playgroud)
第二列(col2):
select distinct type,maker
from product
Run Code Online (Sandbox Code Playgroud)
所以现在我需要从col1和col2获得所有可能的组合.有什么建议吗?
不久,这个:
A f1
B f2
Run Code Online (Sandbox Code Playgroud)
应该成为这样的:
A f1
A f2
B f1
B f2
Run Code Online (Sandbox Code Playgroud)
PS此查询不会返回我需要的内容.
select distinct A.maker, B.type
from product as A
Run Code Online (Sandbox Code Playgroud)