Lists the columns that will appear in the output.
See: | column-definition |
Creating a Table and Inserting Data into It | |
Creating a Table from a Query's Result |
assigns a temporary, alternate name to the column.
eliminates duplicate rows. The DISTINCT argument is identical to UNIQUE.
Note | DISTINCT works on the internal or stored value, not necessarily on the value as it is displayed. Numeric precision can cause multiple rows to be returned with values that appear to be the same. |
Tips | A row is considered a duplicate when all of its values are the same as the values of another row. The DISTINCT argument applies to all columns in the SELECT list. One row is displayed for each existing combination of values. |
If available, PROC SQL uses index files when processing SELECT DISTINCT statements. | |
Example | Producing All the Possible Combinations of the Values in a Column |
is one of the following:
represents all columns in the tables or views that are listed in the FROM clause.
derives a column from a CASE expression. See CASE Expression.
names a single column. See column-name and column-modifier.
derives a column from an sql-expression. See sql-expression and column-modifier.
specifies all columns in the PROC SQL table that is specified in table-name.
specifies all columns in the PROC SQL table that has the alias that is specified in table-alias.
specifies all columns in the SAS view that is specified in view-name.
specifies all columns in the SAS view that has the alias that is specified in view-alias.