select parameter_name from jx_performance_parameter group by parameter_name having count(parameter_name) > 1
parameter_name字段现实的数据没有办法完全精确。就是说:呼吸一科判读费 和 呼吸二科判读费 会被统计为一组。怎么精确查找呢?
------解决方案--------------------
TRY
- SQL code
create table jx_performance_parameter(parameter_name nvarchar(128))insert jx_performance_parameter select N'呼吸一科判读费' UNION SELECT N'呼吸二科判读费'SELECT parameter_name FROM (SELECT STUFF(parameter_name,3,1,'') parameter_name FROM jx_performance_parameter )AGROUP BY parameter_nameHAVING COUNT(parameter_name)>1/*parameter_name呼吸科判读费*/