首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

怎么根据一个表的内容对另一个表进行排序

2012-09-14 
如何根据一个表的内容对另一个表进行排序现在有两个表一个表为Product ,下有两个字段 Name FactureID其中N

如何根据一个表的内容对另一个表进行排序
现在有两个表
一个表为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

热点排行