关于一个SQL语句,急急急!

来源:百度知道 编辑:UC知道 时间:2024/09/12 22:24:00
目前有两个表
第一会员信息表
第二信息表

其中我现在想做的就是把信息表里面显示会员发布的信息,就显示一条信息,不管会员发布了多少条信息只显示会员发布的一条信息,这应该怎么做的到?
"select top 1 from manage_info INNER JOIN manage_user on manage_info.U_ID=Manage_user.U_ID where Manage_info.U_ID<>0"
这样写不对啊???

这个应该是每个会员最近发送的信息了,不对M
select ta.会员姓名,tb.会员信息 from 会员信息表 ta,信息表 tb,(select 会员ID ,max(时间) '时间' from 信息表 group by 会员ID)tc
where ta.会员ID=tb.会员ID and tb.会员ID=tc.会员ID and tb.时间=tc.时间

select top 1 from 会员信息表 a INNER JOIN 信息表 b on a.ID=b.ID where a.ID<>0

取一条数据就完了。