日期:2014-05-17  浏览次数:20624 次

如何根据一个表的内容对另一个表进行排序
现在有两个表
一个表为Product ,下有两个字段 Name FactureID 
其中Name 为 string类型
FactureID 为 int 类型

另一个表为 Facture ,下面有两个字段 FactureName,FactureID 
其中FactureName为 string类型
FactureID 为 int 类型

表Product的FactureID 和 表Facture 的FactureID 是对应的

现在想根据表Facture 中的FactureName 对表Product 进行排序 
该如何使用SQL语句或者别的方法呢?
谢谢!

------解决方案--------------------
select a.* from Product a left join Facture b on a.FactureID = b.FactureID
order by b.FactureName