我有以下表结构。
<h1>ID Country</h1>
1 Country1 <br/>
2 Country2 <br/>
3 Country3 <br/>
4 Country1 <br/>
5 Country2 <br/>
6 Country3 <br/>
7 Country1 <br/>
8 Country2 <br/>
9 Country3 <br/>
10 Country1 <br/>
11 Country2 <br/>
12 Country3 <br/>
我需要基于国家的输出我传递给sql查询
如果我将Country作为Country1传递
然后我应该得到如下输出
1 Country1
4 Country1
2 Country2
5 Country2
7 Country1
10 Country1
3 Country3
6 Country3
总结2国家结果
提前致谢。
答案 0 :(得分:0)
尝试
SELECT uid, country
FROM table_name
ORDER BY country ASC;
(或DESC,你需要的)