CS2203 - Self-Quiz Unit 6 PDF

Title CS2203 - Self-Quiz Unit 6
Course Databases 1
Institution University of the People
Pages 4
File Size 136.1 KB
File Type PDF
Total Downloads 43
Total Views 148

Summary

CS2203 - Self-Quiz Unit 6...


Description

Question

Correct

Mark 1.00 out of 1.00

Which of the following statements is true concerning subqueries? Select one: a. Involves the use of an inner and outer query b. Cannot return the same result as a query that is not a subquery. c. Does not start with the word SELECT. d. All of the above.

Your answer is correct. The correct answer is: Involves the use of an inner and outer query

Question

Correct

Mark 1.00 out of 1.00

A user is setting up a join operation between tables EMP and DEPT. There are some employees in the EMP table that the user wants returned by the query, but the employees are not assigned to departments yet. Which SELECT statement is most appropriate for this user? Select one: a. Select e.empid, d.head from emp e, dept d; b. Select e.empid, d.head from emp e, dept d where e.dept# = d.dept#; c. Select e.empid, d.head from emp e, dept d where e.dept# (+) = d.dept#; d. Select e.empid, d.head from emp e right outer join dept d on e.dept# = d.dept#;

Your answer is correct. The correct answer is: Select e.empid, d.head from emp e right outer join dept d on e.dept# = d.dept#;

Question

Correct

Mark 1.00 out of 1.00

Which SQL keyword is used to sort the result-set? Select one: a. SORT BY b. ORDER c. ORDER BY d. SORT

Your answer is correct. The correct answer is: ORDER BY

Question

Correct

Mark 1.00 out of 1.00

Which of the following is a UNION query? Select one: a. Combines the output from no more than two queries and must include the same number of columns. b. Combines the output from no more than two queries and does not include the same number of columns. c. Combines the output from multiple queries and must include the same number of columns. d. Combines the output from multiple queries and does not include the same number of columns.

Your answer is correct. The correct answer is: Combines the output from multiple queries and must include the same number of columns.

Question

Correct

Mark 1.00 out of 1.00

Data integrity is concerned with ensuring that any new data that is added to the tables is compatible with the existing inter-table relationships. Select one: True False

The correct answer is 'True'.

Question

Correct

Mark 1.00 out of 1.00

SELECT LECTURERS.SURNAME, LECTURERS.SURNAME FROM LECTURERS, LECTURERS WHERE DEPT_NO = DEPT_NO ; The above query is syntactically correct. Select one: True False

The correct answer is 'True'.

Question

Correct

Mark 1.00 out of 1.00

Which of the following statements is wrong? Select one: a. Aggregate functions are mostly used in the WHERE clause of a SELECT statement. b. When using the equivalence operator (=) in the predicate, you must make sure that the subquery retrieves exactly one value. c. SQL's concept of joining two or more tables also applies to joining two copies of the same table. d. Output of the COUNT() function is the number of rows or column values that would be selected by the query.

Your answer is correct. The correct answer is: Aggregate functions are mostly used in the WHERE clause of a SELECT statement.

Question

Correct

Mark 1.00 out of 1.00

Students Table Surname First_Name Student_No Dept_No Year Duke Fitzroy 1 4 2 Al-Essawy Zaid 2 4 2 Phil 3 3 1 Ayton Patel Mahesh 4 2 1 Jones Gareth 5 2 1 Scott Gavin 6 2 2 CREATE VIEW Freshman AS Select * From Students Where Year = 2; Considering the above Students table and Freshman view, what will be the result of the following SQL query: Select * From Freshman Where Dept_No=2; Select one:

a.

Surname First_Name Student_No Dept_No Year Duke Fitzroy 1 4 2 Al-Essawy Zaid 2 4 2 b.

Surname First_Name Student_No Dept_No Year Patel Mahesh 4 2 1 Jones Gareth 5 2 1 Scott Gavin 6 2 2 c.

Surname First_Name Student_No Dept_No Year Scott Gavin 6 2 2 d.

Surname First_Name Student_No Dept_No Year Patel Mahesh 4 2 1 Jones Gareth 5 2 1

Your answer is correct. The correct answer is:

Surname First_Name Student_No Dept_No Year Scott Gavin 6 2 2...


Similar Free PDFs