select a.病人字段 , b.* from patientinfo a, patientcaseinfo b where a.npid = b.npid
还是?
select a.病人字段 , b.* from patientinfo a, patientcaseinfo b where a.patient = b.npid
还是?
select a.病人字段 , b.* from patientinfo a, patientcaseinfo b where a.patient = b.npid
解决方案 »
- 再求一SQL语句,关于left join and right join 相关,请求(maco_wang 叶子)帮助.
- SQL Server Management Studio是什么+为什么我不能通过它来建本地数据库
- 数据表的名称“[database3].[dbo].['software-ck$']”的含义是什么?
- 重装了win2003系统和sqlserver2000数据库,不知道为什么原来的数据库里时间字段变成 2006-2-21 下午 01:49:06 这种格式了,怎么回事?
- 关联更新问题
- 字符串拆分
- 请问要实现多个论坛数据库表的用户信息共享,有什么好的解决办法?
- 如何使用日志恢复数据?
- 按不同的类别分表相应的表,求SQL语句。
- 虚拟机的两个系统中的SQL SERVER 无法互相注册?
- 如何用一條Sql語句搜索重復的記錄 和 如何用一條Sql語句查找出不重復的記錄
- SQL字段計算
*
from 病例表 a
where
(select count(1) from 病人表 where 病例ID=a.ID)>1
select * from patientinfo where npid in
(select npid from patientcaseinfo group by npid having count(*) > 1)
--这样?
select a.name , count(*) 个数
from patientinfo a , patientcaseinfo b
where a.npid = b.npid
group by name
谢谢
你这边列出了每个病人对应的病例个数
我现在只想要病例个数>5的改怎么写?还有我只要病例个数>5的病人的数量马上结贴!谢谢潇洒老乌龟