sql关键查询

情境:保留表A数据,且A表与B表是一对多关系

SELECT tuf.Id,tuf.FileName,tuf.type,tuf.url,tum.MachineId,tum.IsDownland,tum.IsFlag
FROM t_UpgradeFile tuf
LEFT join (SELECT t.* from  t_Upgrade_Machine t where t.MachineId='3333' ) tum on tuf.Id=tum.UpgradeFileId

 

posted @ 2013-12-02 15:59  Seaurl  阅读(267)  评论(0编辑  收藏  举报