求一简单SQL,急,在线等!
products表中有分类表category1,category2,category3的主键ID,怎么查询products时把category1id,category2id,category3id转为categoryName1,categoryName2,categoryName3 ?
------解决方案----------------------try
select * from products
left join category1 on category1.category1id=products.category1id
left join category2 on category2.category2id=products.category2id
left join category3 on category3.category3id=products.category3id
------解决方案--------------------as