如何从nodejs中嵌套了多个表数据的json构建sql连接查询?
添加输入和输出的示例代码片段。
{
filters:[
{
table: table1,
field: some_field,
operation: some_operation_like_equalto
value: some_value_to_equat_to_field
},
{
table: table2,
field: some_field,
operation: some_operation_like_equalto
value: some_value_to_equat_to_field
}
],
fields:[
{
table: table1,
field: some_field
},
{
table: table2,
field: some_field
}
]
}
select A.some_field,B.some_field
from (
select some_field1 , field1 from table1
) as A
GLOBAL FULL OUTER JOIN (
select some_field1 , field1 from table2
) as B
ON (A.field1 = B.field2)
暂无答案!
目前还没有任何答案,快来回答吧!