以下是mysql查询,我希望在结果中重复数据。我已经尝试了UNION ALL,但它会引发语法错误。
Select attribute_name from attribute WHERE (SELECT attribute_id from platform_metadata_map );
任何帮助表示赞赏!
答案 0 :(得分:0)
这是错误的,因为
Select attribute_name
from attribute
WHERE (SELECT attribute_id from platform_metadata_map );
where子句不匹配(你shoudl使用where attribute_id =(select ....)) 无论如何你想要重复你应该使用union all
重复查询Select attribute_name
from attribute
union all
Select attribute_name
from attribute
union all
Select attribute_name
from attribute
union all
Select attribute_name
from attribute