sql多表查询语句问题

[复制链接]
查看11 | 回复3 | 2012-3-14 11:24:58 | 显示全部楼层 |阅读模式
update tableaset b = tableb.b, c=tableb.cfrom tableajoin (select a, max(f) f from tableb group by a) b1 on tablea.a = b1.ajoin tableb on tableb.a = b1.a and tableb.f = b1.f...
回复

使用道具 举报

千问 | 2012-3-14 11:24:58 | 显示全部楼层
update table a from a.b=b.b,a.c=b.c(select top 1 a.a,a.b,a.c,b.a,b.b,b.c from b where b.a=a.a order by f) where a.a=b.a...
回复

使用道具 举报

千问 | 2012-3-14 11:24:58 | 显示全部楼层
然后问题是我只知道用户表中的username,要怎么写SQL语句才能求出该用户的你的表我看不太懂,哪个字段是和用户表中的userid连接的 select a.发帖...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行