摘要:
--含有医院编号字段的所有表selecta.[name]表名fromsysobjectsa,(select[id],count(*)bfromsyscolumnswhere[name]='HospitalId'groupby[id])bwherea.[id]=b.[id]--同时含有医院编号和科室编号字段的所有表selecta.[name]表名fromsysobjectsaleftjoin(select[id],count(*)bfromsyscolumnswhere[name]in('HospitalId','DepartmentId')gro 阅读全文