Reading and Writing Data with SQL |
1. Which type of join joins a table to itself?
A. Inner join
B. Cartesian join
C. Self join
D. Outer join
Answer: C
2. Which of the following statements are/is true?
A. Filtered query allows summarizing, grouping of records into summarized record set.
B. Aggregated query allows summarizing, grouping of records into summarized record set.
C. Nested query merges multiple query results together.
D. UNION keyword is used in composite query
Answer: B, D
3. _____________ contains blocks of command, where each successive block is dependent on the result of previous block.
A. Procedural language
B. Non-procedural language
Answer: A
4. In relational database, ___________ allows to temporarily stores changes.
A. Commit command
B. Rollback command
C. A transaction
D. None
Answer: C
5. For which type of query Order by clause is used?
A. Basic query
B. Filtered query
C. Sorted query
D. Join query
Answer: C
6. Filtering using a negative such as NOT or != forces full table uses index and avoid scanning full table.
A. True
B. False
Answer: A
7. The LIKE operator is not efficient because it tends to full table scan.
A. True
B. False
Answer: A
8. Which type of join simply joins two tables regardless of any relationship?
A. Self join
B. Cross join
C. Full outer join
D. Nested join
Answer: B
9. Which of the following statement(s) is/are true?
A. Composite queries may not have the same data types for each field, all in the same sequence.
B. Insert column allows addition to tables in database.
C. A single command must be executed within a single transaction.
D. The DISTINCT clause is used to return only the unique records in a set of returned records.
Answer: C, D
10. 10 The WHERE and HAVING clause are used for same purpose.
A. True
B. False
Answer: A
11. For sorting data, which clause is used?
A. WHERE clause
B. HAVING clause
C. ORDER BY clause
D. GROUP BY Clause
Answer: C
12. A query contain another query is called? Choose two.
A. Basic Query
B. Filter Query
C. Nested Query
D. Aggregate Query
E. Sub Query
Answer: C,E
13. Which command are used to change data in tables in a database? Choose two.
A. SELECT
B. UPDATE
C. SUBQUERY
D. DELETE
Answer: B,D
14. Which types of query merge multiple query result together?
A. Basic Query
B. Filter Query
C. Composite Query
D. Nested Query
Answer: C
15. Which commands allow alteration to metadata?
A. DELETE Command
B. ALTER Command
C. SELECT Command
D. UPDATE Command
Answer: B
16. A join who merges all records in one table with all records in another tables is called?
A. Self join
B. Outer join
C. Cross join
D. Equi join
Answer: C
0 Comments