一道关于数据库的面试题
一个List表格里有A B C 三个字段
A字段里有 9 ,9 ,7
要求:查询表格中A的数据,按升序排列,去除重复的数据
[解决办法]
select distinct(A) from list order by A
[解决办法]
- SQL code
select distinct A from List order by A asc
发布时间: 2012-11-06 14:07:00 作者: rapoo
一道关于数据库的面试题
一个List表格里有A B C 三个字段
A字段里有 9 ,9 ,7
要求:查询表格中A的数据,按升序排列,去除重复的数据
[解决办法]
select distinct(A) from list order by A
[解决办法]
select distinct A from List order by A asc