问一个多表联合查询问题 select id ,name ,sex ,(select max(p) from s where s.id = e.id)from e 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select a.* ,b.pfrom E a,S bwhere a.id=b.e_id and b.id=(select max(id) from S where e_id=e.id) select id ,name ,sex ,(select p from s where id = (select max(id ) from s where s.id = e.id))from e select E.id as 'ID' ,E.name as '姓名' ,E.sex as '姓名' ,(select top 1 p from S where e_id=E.id order by id desc) as '最近销售的产品'from E select a.*,b.Pfrom E a,S bwhere a.id = b.Eid and not exists(select 1 from S where Eid=b.Eid and id>b.id) select a.*, (select top 1 p from S where Eid = e.id order by id desc)from E a email SQL2005编辑视图的字体如何变大? not exists 求一复杂的SQL语句 请教高手,请大家看看这个sql语句怎么写? 这两个sql一样吗? 多条件查询 请朋友给点思路 救急:怎样更改text字段的部分内容? 请问有谁见过200多和300多个字段的表吗???? 数据库开发网络版的一个令人头痛的问题(回答得好都有分) 如何将表中的二进制数据导出 如何转换整数类型到货币类型
from E a,S b
where a.id=b.e_id and b.id=
(select max(id) from S where e_id=e.id)
from e
,E.name as '姓名'
,E.sex as '姓名'
,(select top 1 p
from S
where e_id=E.id
order by id desc) as '最近销售的产品'
from E
a.*,b.P
from
E a,S b
where
a.id = b.Eid
and
not exists(select 1 from S where Eid=b.Eid and id>b.id)
a.*,
(select top 1 p from S where Eid = e.id order by id desc)
from
E a