本文介绍了如何克服与其他表连接联合表的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
尽管我们试图在一侧的联合表与另一侧的其他表之间进行联接,但是,我们试图在联合表之间加入联合表。
While we try to join between union tables on one side with other table on the other side,
SELECT A.x,B.y FROM ([DataSet.Liad],[DataSet.Livne]) AS A INNER JOIN [DataSet.Names] AS B ON A.ID = B.ID LIMIT 10
我们得到这个错误:
we get this error:
为了解决这个错误,我建议你使用一个View。
将联合查询保存为View,DataSet.LiadLivne:
In order to solve this error I suggest you to use a View.Save this Query of union as a View, DataSet.LiadLivne:
SELECT * FROM [DataSet.Liad],[DataSet.Livne]
使用视图执行原始查询:
Execute the origin query using the view:
SELECT A.x,B.y FROM [DataSet.LiadLivne] AS A INNER JOIN [DataSet.Names] AS B ON A.ID = B.ID LIMIT 10
享受
Enjoy
推荐答案
You need to write as:
SELECT A.x,
B.y
FROM
(SELECT A.x
FROM ([DataSet.Liad],[DataSet.Livne])) AS A
INNER JOIN [DataSet.Names] AS B ON A.ID = B.ID LIMIT 10
这篇关于如何克服与其他表连接联合表的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!