1148. 文章浏览 I
考察DISTINCT as ORDER BY
select DISTINCT author_id as id from Views
where author_id=viewer_id ORDER BY id
从Views表中选取author_id列的值
使用DISTINCT去除重复值
alias author_id为id
使用ORDER BY对id列排序输出结果为Views表中author_id列的不重复值集合,有序。
考察DISTINCT as ORDER BY
select DISTINCT author_id as id from Views
where author_id=viewer_id ORDER BY id
从Views表中选取author_id列的值
使用DISTINCT去除重复值
alias author_id为id
使用ORDER BY对id列排序输出结果为Views表中author_id列的不重复值集合,有序。