Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. What is a CROSS JOIN? Give an example of its syntax. 2. What three join types are included in the OUTER JOIN classification?

image text in transcribed

1. What is a CROSS JOIN? Give an example of its syntax. 2. What three join types are included in the OUTER JOIN classification? 3. Using tables named T1 and T2, write a query example for each of the three join types you described in Question 2. Assume that T1 and T2 share a common column named C1. 4. What is a subquery, and what are its basic characteristics? 5. What are the three types of results that a subquery can return? 6. What is a correlated subquery? Give an example. 7. Explain the difference between a regular subquery and a correlated subquery. 8. What does it mean to say that SQL. operators are set-oriented? 9. The relational set operators UNION, INTERSECT, and EXCEPT (MINUS) work properly only when the relations are union-compatible. What does union-compatible mean, and how would you check for this condition? 10. What is the difference between UNION and UNION ALL? Write the syntax for each. 11. Suppose you have two tables: EMPLOYEE and EMPLOYEE 1. The EMPLOYEE table contains the records for three employees: Alice Cordoza, John Cretchakov, and Anne McDonald. The EMPLOYEE_1 table contains the records for employees John Cretchakov and Mary Chen. Given that information, list the query output for the UNION query. 12. Given the employee information in Question 11, list the query output for the UNION ALL query. 13. Given the employee information in Question 11, list the query output for the INTERSECT query. 14. Given the employee information in Question 11, list the query output for the EXCEPT (MINUS) query of EMPLOYEE to EMPLOYEE_1. 15. Why does the order of the operands (tables) matter in an EXCEPT (MINUS) query but not in a UNION query? 16. What MS Access and SQL Server function should you use to calculate the number of days between your birth date and the current date? 17. What Oracle function should you use to calculate the number of days between your birth date and the current date? 18. Suppose a PRODUCT table contains two attributes, PROD_CODE and VEND_CODE. Those two attributes have values of ABC, 125, DEF, 124, GHI, 124, and JKL, 123, respectively. The VENDOR table contains a single attribute, VEND_CODE, with values 123, 124, 125, and 126, respectively. (The VEND_CODE attribute in the PRODUCT table is a foreign key to the VEND_CODE in the VENDOR table.) Given that information, what would be the query output for: a. A UNION query based on the two tables? b. A UNION ALL query based on the two tables? c. An INTERSECT query based on the two tables? d. An EXCEPT (MINUS) query based on the two tables? 19. What string function should you use to list the first three characters of a company's EMP_LNAME values? Give an example using a table named EMPLOYEE. Provide examples for Oracle and SQL Server. 20. What is an Oracle sequence? Write its syntax. 21. What is a trigger, and what is its purpose? Give an example. 22. What is a stored procedure, and why is it particularly useful? Give an example. 23. What is embedded SQL and how is it used? 24. What is dynamic SQL, and how does it differ from static SQL?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Computer Performance Engineering 10th European Workshop Epew 2013 Venice Italy September 17 2013 Proceedings

Authors: Maria Simonetta Balsamo ,William Knottenbelt ,Andrea Marin

2013 Edition

3642407242, 978-3642407246

More Books

Students also viewed these Programming questions

Question

What method do agents in it transaction use to record sales?

Answered: 1 week ago