SQL Test Answer Part-04

 

31. Which of the following date function(s) are valid?

  1. NEXT_DATE
  2. NEXT_MONTH
  3. MONTHS_BETWEEN
  4. DAYS_BETWEEN

Answer: a, b, c, d.

32. Which of the following clauses are not allowed in a single row sub-query?

  1. From
  2. Where
  3. Group by
  4. Having
  5. Order by

Answer: e. Order by

33. How can data be accessed by users who do not have direct access to the tables?

a. By creating views

b. By creating triggers

c. By creating stored procedures

d. None of the above

Answer: a. By creating views

34. The primary key index does not allow ________ data in a field.

  1. Numeric
  2. Character
  3. Date
  4. Null
  5. Duplicate
  6. All of the above

Answer. d, e

35. What items, other than column names can be included in the select clause?

  1. Arithmetic Expressions
  2. Column aliases
  3. Concatenated columns
  4. None of the above

Answer: a. Arithmetic Expressions

36. Which of the following field names are correct?

  1. EmpNo
  2. 25Block
  3. #AccountID
  4. _CustomerName
  5. Product.Name

Answer: a, c, d.

37. The Employee table uses alphanumeric characters for there Employee ID field, which contains 7 digits prefixed with 3 characters. The alphanumeric characters refer to the department code. You want to generate a list of all the department codes displayed in capital letters. Which function(s) you will use for this query?

a. CONCAT()

b. SUBSTR()

c. UPPER()

d. LOWER()

e. REPLACE()

Answer: c. UPPER

38. Select all the appropriate options.

a. A table is a multi set of rows

b. A table is a two-dimensional array of rows and columns

c. A table is always dependent on other tables

d. A third normal form table is a table free of redundant data

e. A table must be have a primary key

Answer: a, b, d

39. Which statements are true for views?

  1. The definition of a view is stored in data dictionary
  2. Views provide a more secure way of retrieving data
  3. Views are actually Tables and store data in the same manner as Tables
  4. All of the above

Answer: a, b

40. Which techniques should be used to obtain a result which is based on comparing one row of a table with another row of the same table?

  1. Equi-join
  2. Inner join
  3. Outer join
  4. Self join
  5. Correlated subquery
  6. None of the above

Comments

comments

Leave a Comment

Time limit is exhausted. Please reload CAPTCHA.