我总是收到“使用的 select 语句具有不同的列数”错误。
select Sublessee_uname, Sublessee_fname, Sublessee_mname, Sublessee_fname from sublessee
union
select Sublessee_space, Sublessee_product from space_reserve
最佳答案
这个错误几乎是不言自明的。在第一个SELECT
中,您有4 列,而在第二个SELECT
中,您有2 列。为了使用 UNION
,两个 SELECT
中的列数必须匹配。
关于mysql - sql联合错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12554232/