这是我的查询
SELECT Id, productName, Largeimagepath, Discount, Price, Image FROM tablename1 where Active =1
union
SELECT Id, productName, Largeimagepath, Discount, Price, Image FROM tablename2 where Active =1
union
SELECT Id, productName, Largeimagepath, Discount, Price, Image FROM tablename3 where Active =1
Run Code Online (Sandbox Code Playgroud)
它工作正常。
现在我想productName
在将来获取各自的表名。
我试过AS
..像这样:
SELECT Id, productName, Largeimagepath, Discount, Price, Image
FROM tablename3 AS tablename
where Active = 1;
Run Code Online (Sandbox Code Playgroud)
但没有得到输出。