SELECT 语法
PROC SQL options;
SELECT column(s)
FROM table-name | view-name
WHERE expression
GROUP BY column(s)
HAVING expression
ORDER BYcolumn(s);
QUIT;
例 1:
proc sql;
select name
,sex
from sashelp.class ;
quit;
SELECT 语句按以下顺序指定:
1.select;
2.from;
3.where;
4.group by;
5.having;
6.order by.
需要选择和来自。其他条款是可选的。