select distinct b.COLUMN_NAME,b.comments,a.column_id from user_tab_columns a,user_col_comments b where a.column_name=b.column_name and b.table_name=upper('SLGC_SK') order by a.column_id;
当distinct和order by同时使用时,order by后面的内容必须包含在查询的结果里。
select distinct b.COLUMN_NAME,b.comments,a.column_id from user_tab_columns a,user_col_comments b where a.column_name=b.column_name and b.table_name=upper('SLGC_SK') order by a.column_id;
当distinct和order by同时使用时,order by后面的内容必须包含在查询的结果里。