Sentry Page Protection
Summary
1. There are mainly four types of joins in Proc SQL:
Each type of join starts with a Cartesian product.
2. The Cartesian product matches each row from the left table with every row from the right table.
3. An inner join combines the SAS tables horizontally and keeps only the matching rows between the two (or more) tables.
4. Unlike the MERGE statement in the data step, a Proc SQL join does not require the matching columns to have the same name.
5. A table alias is a temporary name that can be used in place of the actual table name in a Proc SQL query.
6. Full Outer Joins join two tables by including all of the matching rows in the tables, as well as all of the non-matching rows from each input table.
7. The COALESCE function allows you to overlay the columns from the different input tables.
8. Left Outer Joins join two tables by including all of the matching rows across the tables, as well as the non-matching rows from the left table.
9. There are four types of SET operators in Proc SQL:
10. The Union Set operator concatenates the two input tables and includes all of the rows from each table.
11. The Except Set operator concatenates the two input tables and includes only the rows from the first table that are not in the second table.
12. The Intersect Set operator also concatenates the input tables and includes only the rows that appear in both input tables.
13. When using the Union, Except or Intersect Set operators, SAS does not overlay the columns by the column names. Instead, it overlays the column by its position.
14. The CORR keyword can be used to overlay columns by the column names instead of the column position.
15. The ALL keyword tells SAS to keep the duplicate rows when using the SET operators.
16. The Outer Union Set operator also concatenates the input tables. However, it does not remove duplicate rows. None of the columns are overlaid by default.
17. The CREATE TABLE statement allows you to create an actual SAS table in Proc SQL.
18. The INSERT statement allows you to insert rows into the SAS table.
19. You can update the data values using the UPDATE statement.
20. Table columns can be altered using the ALTER TABLE statement. You can alter the column attributes such as length, label and format of the columns.
21. Rows can be deleted using the DELETE statement and tables can be dropped using the DROP statement.
22. Integrity constraints are the restrictions on how the data can be captured in a table. They can prevent invalid data from being added to the table.
23. There are four general integrity constraints:
- Inner join
- Full outer join
- Left outer join
- Right outer join
Each type of join starts with a Cartesian product.
2. The Cartesian product matches each row from the left table with every row from the right table.
3. An inner join combines the SAS tables horizontally and keeps only the matching rows between the two (or more) tables.
4. Unlike the MERGE statement in the data step, a Proc SQL join does not require the matching columns to have the same name.
5. A table alias is a temporary name that can be used in place of the actual table name in a Proc SQL query.
6. Full Outer Joins join two tables by including all of the matching rows in the tables, as well as all of the non-matching rows from each input table.
7. The COALESCE function allows you to overlay the columns from the different input tables.
8. Left Outer Joins join two tables by including all of the matching rows across the tables, as well as the non-matching rows from the left table.
9. There are four types of SET operators in Proc SQL:
- Union
- Except
- Intersect
- Outer Union
10. The Union Set operator concatenates the two input tables and includes all of the rows from each table.
11. The Except Set operator concatenates the two input tables and includes only the rows from the first table that are not in the second table.
12. The Intersect Set operator also concatenates the input tables and includes only the rows that appear in both input tables.
13. When using the Union, Except or Intersect Set operators, SAS does not overlay the columns by the column names. Instead, it overlays the column by its position.
14. The CORR keyword can be used to overlay columns by the column names instead of the column position.
15. The ALL keyword tells SAS to keep the duplicate rows when using the SET operators.
16. The Outer Union Set operator also concatenates the input tables. However, it does not remove duplicate rows. None of the columns are overlaid by default.
17. The CREATE TABLE statement allows you to create an actual SAS table in Proc SQL.
18. The INSERT statement allows you to insert rows into the SAS table.
19. You can update the data values using the UPDATE statement.
20. Table columns can be altered using the ALTER TABLE statement. You can alter the column attributes such as length, label and format of the columns.
21. Rows can be deleted using the DELETE statement and tables can be dropped using the DROP statement.
22. Integrity constraints are the restrictions on how the data can be captured in a table. They can prevent invalid data from being added to the table.
23. There are four general integrity constraints:
- CHECK
- NOT NULL
- UNIQUE
- PRIMARY KEY