05 租房网

来源:互联网 发布:混沌摆钢铁侠淘宝 编辑:程序博客网 时间:2024/06/11 06:44
--阶段一
select top 5 * from hos_house as temp where   HMID not in(select TOP 5 HMID from hos_house order by HMID)order by HMID    --阶段二select dname,SNAME,HTID,PRICE,TOPIC,CONTENTS,HTIME,COPY from hos_street   inner join hos_house on hos_house.SID=hos_street.SID  inner join hos_district on hos_district.DID=hos_street.SDID  where UID=(select UID from sys_user where UNAME='张三')    --阶段三select htname,uname,dname,SNAME from hos_house  inner join sys_user on sys_user.UID=hos_house.UID  inner join hos_type on hos_type.HTID=hos_house.HTID   inner join hos_street on hos_house.SID=hos_street.SID  inner join hos_district on hos_district.DID=hos_street.SDID  where Sdid in(select SDID from hos_street group by SDID having COUNT(SID)>1)  

0 0
原创粉丝点击