select id, Count(*) from tb group by id having count(*)>1
select*from(select count(ID) as count from table group by ID)T where T.count>1
<pre t="code" l="cpp">#include<stdio.h>
int main(void)
{
int a, b;
char c;
printf("请è¾å ¥ä¸¤ä¸ªæ°:");
scanf("%d %d", a, b);
getchar();
printf("请è¾å ¥ä½ éè¦çè¿ç®æ³åï¼");
scanf("%c",c);
switch (c)
{
case '+':
printf("%d+%d = %d", a, b, a+b);
break;
case '-':
printf("%d-%d = %d", a, b, a-b);
break;
case '*':
printf("%d*%d = %d", a, b, a*b);
break;
case '/':
printf("%d/%d = %d", a, b, a/b);
break;
default:
printf("è¾å ¥ç符å·æéï¼");
break;
}
return 0;
}
int main(void)
{
int a, b;
char c;
printf("请è¾å ¥ä¸¤ä¸ªæ°:");
scanf("%d %d", a, b);
getchar();
printf("请è¾å ¥ä½ éè¦çè¿ç®æ³åï¼");
scanf("%c",c);
switch (c)
{
case '+':
printf("%d+%d = %d", a, b, a+b);
break;
case '-':
printf("%d-%d = %d", a, b, a-b);
break;
case '*':
printf("%d*%d = %d", a, b, a*b);
break;
case '/':
printf("%d/%d = %d", a, b, a/b);
break;
default:
printf("è¾å ¥ç符å·æéï¼");
break;
}
return 0;
}
温馨提示:答案为网友推荐,仅供参考