Tag: databases

Questions Related to databases

What is the output? DECLARE @val CHAR(20) SET @val = ' SQL is cool ' select LEN(@val)

  1. 20

  2. 14

  3. 12

  4. 13


Correct Option: C

AI Explanation

To answer this question, you need to understand the LEN function in SQL.

The LEN function is used to return the number of characters in a specified string. In this case, the specified string is the variable @val, which is set to ' SQL is cool '.

The LEN function will count all characters in the string, including leading and trailing spaces. Therefore, the output of the query select LEN(@val) will be the total number of characters in the string, which is 12.

So, the correct answer is C) 12.

  1. Primary key access

  2. Full table scan

  3. Access via unique index

  4. Table access by ROWID

  5. None of the above


Correct Option: A
  1. By value

  2. By reference

  3. By type

  4. none of the above


Correct Option: A

What is RAC

  1. Real abstarct clustersl

  2. Real application cursors

  3. Real application clusters

  4. none of the above


Correct Option: A