345 - SQL Database Fundamentals - R - 2018
345 - SQL Database Fundamentals - R - 2018
SQL DATABASE
FUNDAMENTALS
(345)
REGIONAL – 2018
Multiple Choice:
MULTIPLE CHOICE
Identify the letter of the choice that best completes the statement or answers the question. Mark A if
the statement is true. Mark B if the statement is false.
1. Which of the following SQL commands would you use to identify all of the non-duplicate
values for a table column?
a. UNIQUE
b. DIFF
c. DISTINCT
d. COMPARE
2. A SQL JOIN clause is used to combine data from two or more tables using on a common
field between them.
a. True
b. False
5. Which SQL function would you use to obtain the number of rows that match specified
criteria?
a. TOTAL
b. COUNT
c. AGGREGATE
d. SUM
7. All of the following are true statements regarding the “AS” keyword, except?
a. Applies a permanent alias
b. Applies a temporary alias
c. Allows renaming of database columns
d. Allows renaming of database tables
SQL DATABASE FUNDAMENTALS - REGIONAL 2018
Page 3 of 8
9. Which of the following would you use to add a new record to a database table?
a. CREATE ROW
b. ADD ROW
c. UPDATE TABLE
d. INSERT INTO
11. Which of the following accurately depicts that a value must be present in the EMAIL
column for a record (assume this is part of a CREATE statement)?
a. EMAIL VARCHAR (255) NOT NULL
b. EMAIL VARCHAR (255) REQUIRE
c. EMAIL VARCHAR (255) INDEX
d. EMAIL VARCHAR (255) NOT BLANK
12. All of the following are situations you would avoid using a database index, except?
a. Tables that frequently have large batch updates.
b. Columns that are frequently manipulated.
c. Columns that contain a high number of NULL values.
d. Tables that have large data sets.
13. Which logical operator compares a value to similar values using wildcard operators?
a. IN
b. LIKE
c. COMPARE
d. RELATE
14. Which of the following are valid Data Definition Language (DDL) commands?
a. CREATE
b. DROP
c. ALTER
d. All of the above
15. What category of data integrity ensures there are no duplicate rows in a table?
a. Domain Integrity
b. Entity Integrity
c. Referential Integrity
d. User Defined Integrity
SQL DATABASE FUNDAMENTALS - REGIONAL 2018
Page 4 of 8
16. Deleting a table definition including all data, indexes, triggers, constraints, and permission
for that table is accomplished using which command?
a. DELETE
b. DROP
c. TRUNCATE
d. REMOVE
17. A Foreign Key in one table points to a Domestic Key in another table.
a. True
b. False
18. What would be the result of executing the following SQL statement?
UPDATE Members
SET Email='[email protected]', State='Michigan'
a. Only the record for John Smith in the Members table would be updated.
b. All records in the Members table would be updated.
c. The values in the Email and State columns would be the same for all records in the
Members table.
d. Both B and C.
20. In which of the following would the results include displaying the Last Name from A to Z?
a. SELECT * FROM Customers ORDER BY First_Name ASC, Last Name DESC
b. SELECT * FROM Customers ORDER BY OrderID ASC, Last Name ASC
c. SELECT * FROM Customers ORDER BY Last Name DESC, OrderID ASC
d. SELECT * FROM Customers ORDER BY Last Name DESC, First_Name ASC
21. Which type of JOIN results in the selection of all rows from two tables as long as there is a
match between the columns in each tables?
a. FULL OUTER JOIN
b. UNION
c. RIGHT JOIN
d. INNER JOIN
24. Of the following data types, in which one could you not store the value 123456789?
a. VARCHAR(20)
b. INT
c. NCHAR
d. The value can be stored in all of the above datatypes
25. The SQL statement ALTER TABLE CUSTOMERS ADD DATEOFBIRTH VCHAR(20)
results in which of the following?
a. Adds a new column named DATEOFBIRTH to the CUSTOMERS table
b. Adds a new table named DATEOFBIRTH to the CUSTOMERS database
c. Adds a new row named DATEOFBIRTH to the CUSTOMERS table
d. None of the Above
26. The clause WHERE ACCOUNTNUM LIKE '_5%3' will match all of the following, except
______.
a. 2533483
b. 45434
c. 85103
d. 953
27. The modulus or remainder of dividing two values can be found using which operator?
a. #
b. *
c. %
d. /
29. In which SQL clause will the results include any rows where an employee is over age 25
that have a salary more than $40,000 or employees that have a salary of at least $35,000?
a. WHERE (AGE > 25 AND SALARY > 40000) AND SALARY > 35000
b. WHERE (AGE > 25 AND SALARY > 40000) OR SALARY < = 35000
c. WHERE (AGE > 25 AND SALARY > 40000) OR SALARY > = 35000
d. WHERE AGE > 25 AND (SALARY >= 40000 OR SALARY > = 35000)
SQL DATABASE FUNDAMENTALS - REGIONAL 2018
Page 6 of 8
30. A secured database object has a fully qualified name. Which of the following is not part of
the fully qualified name?
a. Schema
b. Object
c. Principal
d. Server
31. Which of the following statements about Primary Keys is not accurate?
a. A table may have more than one Primary Key
b. Is not required for a table to have a Primary Key
c. A Primary Key must be unique
d. A Primary Key cannot be NULL
32. What statement would you use to copy data from one table and insert it into an existing
table?
a. COPY TO SELECT
b. INSERT INTO SELECT
c. ALTER TABLE INSERT
d. INSERT AND UPDATE TABLE
35. Which type of constraint is used to insert a default value into a column?
a. UNIQUE
b. DEFAULT
c. NOT NULL
d. STANDARD
36. There are three parameters for the SQL MID() function.,. Which of the following is not
required?
a. Column name
b. Start
c. Length
d. All parameters are required
SQL DATABASE FUNDAMENTALS - REGIONAL 2018
Page 7 of 8
37. Examples of SQL Scalar functions include all of the following, except ______.
a. ROUND()
b. LEN()
c. FORMAT()
d. SUM()
38. The maximum number of characters for a SQL Server VARCHAR() column is ______.
a. 255
b. 1024
c. 8000
d. 32,767
39. CRUD =
a. Create, Relate, Update, Delete
b. Create, Relate, Upload, Data
c. Create, Read, Update, Delete
d. Create, Read, Update, Data
41. In the example below, does the SELECT clause has a computed value?
SELECT CustomerName, UnitPrice * NumberofUnits FROM Orders
a. True
b. False
42. Which of the following SQL statements deletes all rows in table called CustomerOrders?
a. DELETE CustomerOrders
b. DELETE * FROM CustomerOrders
c. DELETE ALL CustomerOrders
d. DELETE FROM CustomerOrders
44. Which of the following SQL clauses is used to sort a result set?
a. SORT
b. ORDER BY
c. ARRANGE
d. SORT ORDER
SQL DATABASE FUNDAMENTALS - REGIONAL 2018
Page 8 of 8
46. Which keyword selects all rows from both tables as long as there is a match between the
columns in both tables?
a. LEFT JOIN
b. RIGHT JOIN
c. INNER JOIN
d. FULL OUTER JOIN
49. Which of the following is not a valid format for the DATEPART function?
a. ns
b. qq
c. dy
d. mh
a. Intersect
b. Sub query
c. Array
d. Constraint
SQL DATABASE FUNDAMENTALS - REGIONAL 2018
ANSWER KEY
Page 1 of 2
SQL DATABASE
FUNDAMENTALS
(345)
REGIONAL – 2018
1. C 26. B
2. A 27. C
3. B 28. B
4. D 29. C
5. B 30. C
6. A 31. A
7. A 32. B
8. A 33. A
9. D 34. B
10. B 35. B
11. A 36. C
12. D 37. D
13. B 38. C
14. D 39. C
15. B 40. B
16. B 41. A
17. B 42. D
18. D 43. A
19. D 44. B
20. B 45. B
21. D 46. C
22. A 47. A
23. B 48. B
24. D 49. D
25. A 50. B