SQL Fundamentals and Database Management

Test your knowledge of SQL syntax, database operations, queries, functions, transactions, and error handling

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Among this which is Not a SQL Aggregate Functions ?

  1. FIRST()
  2. AVG()
  3. LAST()
  4. COUNT()
  5. None of these
Question 2 Multiple Choice (Single Answer)

SQL scalar functions return a single value, Among this which is Not a scalar functions?

  1. FORMAT()
  2. ROUND()
  3. UCASE()
  4. AVG()
Question 3 Multiple Choice (Single Answer)

Which function is used to extract characters from a text field?

  1. len()
  2. MID()
  3. FORMAT()
  4. NOW()
Question 4 Multiple Choice (Single Answer)

SQL1715 error means?

  1. Failed to validate subquery
  2. Failed to validate CASE expression
  3. Failed to validate column list
  4. Failed to validate foreign key.
Question 5 Multiple Choice (Single Answer)

SQL1707 error means?

  1. Failed to validate IN predicate
  2. Failed to validate HAVING clause
  3. Failed to validate CASE expression
  4. None of these
Question 6 Multiple Choice (Single Answer)

SQL3008 error means?

  1. SOCKET WRITE ERROR
  2. SESSION TIMEOUT
  3. SOCKET READ ERROR
  4. HEADER NOT FOUND
Question 7 Multiple Choice (Single Answer)

SQL3009 error means?

  1. HEADER TOO LONG
  2. HEADER NOT FOUND
  3. SOCKET READ ERROR
  4. SOCKET WRITE ERROR
Question 8 Multiple Choice (Single Answer)

SQL3011 error means?

  1. SESSION TIMEOUT
  2. INVALID SESSION TICKET
  3. SOCKET WRITE ERROR
  4. FAILED TO EXECUTE GRANT COMMAND
Question 9 Multiple Choice (Single Answer)

What is ACID property?

  1. Atomicity,Consistency,Isolation and Durability
  2. Atomicity,Concurrently,Isolation,Durability
  3. Atomicity,Consistency,Incremental,Durability
  4. Atomicity,Concurrently,Incremental,Durability
Question 10 Multiple Choice (Single Answer)

In which scenario would index be most useful?

  1. The indexed column is declared as NOT NULL
  2. The indexed columns are used in the FROM clause
  3. The indexed columns are part of an expression
  4. The indexed column contains a wide range of values
Question 11 Multiple Choice (Single Answer)

Which clause would you use in a SELECT statement to limit the display to those employees whose salary is greater then 5000?

  1. ORDER BY SALARY > 5000
  2. GROUP BY SALARY > 5000
  3. HAVING SALARY > 5000
  4. WHERE SALARY > 5000
Question 12 Multiple Choice (Multiple Answers)

When should you create a role? (Choose two)

  1. To simplify the process of creating new users using the CREATE USER xxx IDENTIFIED by yyy statement
  2. To grant a group of related privileges to a user
  3. When the number of people using the database is very high
  4. To simplify the process of granting and revoking privileges
Question 13 Multiple Choice (Multiple Answers)

Which four are correct guidelines for naming database tables? (Choose four)

  1. Must begin with either a number or a letter
  2. Must be 1-30 characters long
  3. Should not be an Oracle Server reserved word
  4. Must contain only A-Z, a-z, 0-+, _, *, and #.
  5. Must contain only A-Z, a-z, 0-9, _, $, and #.
  6. Must begin with a letter
Question 14 Multiple Choice (Single Answer)

Which operator can be used with a multiple-row subquery

  1. =
  2. LIKE
  3. BETWEEN
  4. NOT IN
  5. IS
  6. <>
Question 15 Multiple Choice (Single Answer)

You need to perform certain data manipulation operations through a view called EMP_DEPT_VU, which you previously created. You want to look at the definition of the view (the SELECT statement on which the view was create.) How do you obtain the definition of the view

  1. Use the DESCRIBE command in the EMP_DEPT VU view
  2. Use the DEFINE VIEW command on the EMP_DEPT VU view
  3. Use the DESCRIBE VIEW command on the EMP_DEPT VU view
  4. Query the USER_VIEWS data dictionary view to search for the EMP_DEPT_VU view
  5. Query the USER_SOURCE data dictionary view to search for the EMP_DEPT_VU view
  6. Query the USER_OBJECTS data dictionary view to search for the EMP_DEPT_VU view
Question 16 Multiple Choice (Multiple Answers)

Which two are character manipulation functions? (Choose two.)

  1. TRIM
  2. REPLACE
  3. TRUNC
  4. TO_DATE
  5. MOD
  6. CASE
Question 17 Multiple Choice (Multiple Answers)

Which three statements correctly describe the functions and use of constraints? (Choose three.)

  1. Constraints provide data independence
  2. Constraints make complex queries easy
  3. Constraints enforce rules at the view level
  4. Constraints enforce rules at the table level
  5. Constraints prevent the deletion of a table if there are dependencies
  6. Constraints prevent the deletion of an index if there are dependencies
Question 18 Multiple Choice (Single Answer)

You define a multiple-row subquery in the WHERE clause of an SQL query with a comparison operator "=". What happens when the main query is executed?

  1. The main query executes with the first value returned by the subquery
  2. The main query executes with the last value returned by the subquery
  3. The main query executes with all the values returned by the subquery
  4. The main query fails because the multiple-row subquery cannot be used with the comparison operator
  5. You cannot define a multiple-row subquery in the WHERE clause of a SQL query
Question 19 Multiple Choice (Single Answer)

What is true about joining tables through an equijoin

  1. You can join a maximum of two tables through an equijoin
  2. You can join a maximum of two columns through an equijoin
  3. You specify an equijoin condition in the SELECT or FROM clauses of a SELECT statement
  4. To join two tables through an equijoin, the columns in the join condition must be primary key and foreign key columns.
  5. You can join n tables (all having single column primary keys) in a SQL statement by specifying a minimum of n-1 join conditions.
Question 20 Multiple Choice (Single Answer)

Which clause should you use to exclude group results?

  1. WHERE
  2. HAVING
  3. RESTRICT
  4. GROUP BY
  5. ORDER BY