本文介绍了从某些特定的cahrecter开始查找重复值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Quote:

我知道如何使用count()查找重复值但我的问题是如何找到以某个字母开头的重复值喜欢'A'或'K'



i有一张像这样的桌子



id rollnumber city fess

1 A100156 Ajamer 450

2 P102555 Pune 450

3 A100156 Ajamer 450



选择rollnumber,count(rollnumber)AS COUNTOF来自tblmytable group by rollnumber having count(rollnumber)> 1 order by rollnumber



给我这个结果



rollnumber countof



A100156 2

P102555 2



i希望找到以'A'开头的重复卷号



喜欢这个我该如何修改查询

i know how to find duplicate values using count() but my question is how can i find duplicate values starting with some letter like'A' or 'K'

i have a table tblmytable like this

id rollnumber city fess
1 A100156 Ajamer 450
2 P102555 Pune 450
3 A100156 Ajamer 450
4 P102555 Pune 450

select rollnumber,count(rollnumber) AS COUNTOF from tblmytable group by rollnumber having count(rollnumber)>1 order by rollnumber

gives me this result

rollnumber countof

A100156 2
P102555 2

i want to find duplicate roll numbers starting with 'A'

like this how can i modify the query





我尝试过:





What I have tried:

select rollnumber,count(rollnumber) AS COUNTOF from tblmytable group by rollnumber having count(rollnumber)>1 order by rollnumber

推荐答案


这篇关于从某些特定的cahrecter开始查找重复值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-12 22:15