DB2 Administration and Oracle SQL Functions

A comprehensive quiz covering DB2 database administration topics including configuration, authentication, and tools, as well as Oracle SQL string functions and date/time operations.

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

select round(139.898,-2),round(188.898,-2) from dual would results in?

  1. 139.89,188.89
  2. 100,200
  3. -139.89,-188.89
  4. 140,189
Question 2 True/False

state true or false can we apply Round() to the column whose datatype is declared as DATE?

  1. True
  2. False
Question 3 Multiple Choice (Single Answer)

select substr('DECCANPARK',-5,6) FROM DUAL

  1. ERROR
  2. NPARK
  3. DECCAN
  4. NULL
Question 4 Multiple Choice (Single Answer)

The database administrator of your company created a public synonum called HR for the HUMAN_RESOURCES table of the GENERAL schema, because many users frequently use this table. As a user of the database, you created a table called HR in your schema. What happens when you execute this query: SELECT * FROM HR;

  1. You obtain the results retrieved from the public synonym HR created by the DBA.
  2. You obtain the results retrieved from the HR table that belongs to you schema.
  3. You get an error message because you cannot retrieve from a table that has the same name as a public synonym.
  4. You obtain the results retrieved from both the publich synonym HR and the HR table that belongs to your schema, as a Cartesian product.
Question 5 Multiple Choice (Single Answer)

What is the result of the query "Select length(to_char(to_date(11032007,'ddmmyyyy'),'March')) from dual;" ?

  1. 3
  2. 5
  3. 9
  4. Error
Question 6 True/False

When we use DISTINCT keyword in a SELECT query it will sort the output by the column-name we specified in the DISTINCT clause.

  1. True
  2. False
Question 7 True/False

The output of the query " Select length(to_char(2000,'9999')) from dual; " is 4.

  1. True
  2. False
Question 8 Multiple Choice (Single Answer)

The output of the query " Select length(substr('SQL Functions',-10,12)) from dual; " is

  1. 12
  2. 10
  3. 13
  4. error
Question 9 True/False

The REPLACE function in SQL replaces the data in the database and displays it as output.

  1. True
  2. False
Question 10 Multiple Choice (Single Answer)

The output of the query "select sign(abs(-88)) from dual;" is

  1. -
  2. +
  3. 0
  4. 1
  5. None of the above
Question 11 Multiple Choice (Single Answer)

The output for the qyery "select lpad('sql functions',18,'*#$') from dual;" is

  1. *#\$*#\$sql function
  2. error
  3. *#$*#sql functions
  4. None of the above
Question 12 Multiple Choice (Single Answer)

The output of the query " select instr('I''m an expert in oracle','d',-1,1) from dual; " is

  1. 1
  2. error
  3. null
  4. 0
Question 13 Multiple Choice (Single Answer)

The output of the query "select length('This is Ram''s book') from dual; " is

  1. 18
  2. 19
  3. 21
  4. none of the above
Question 14 Multiple Choice (Single Answer)

The output of the query " select instr('I am an expert in sql functions','n',-10,2) from dual; " is

  1. 30
  2. 7
  3. 2
  4. 10
Question 15 Multiple Choice (Single Answer)

The output of the query " select translate('123456789','235','xy') from dual; " is

  1. 1x4y6789
  2. 1xy456789
  3. 1xy46789
  4. error
Question 16 Multiple Choice (Single Answer)

The output of the query " select translate('123456789','235','xy') from dual; " is

  1. 1x4y6789
  2. 1xy456789
  3. 1xy46789
  4. error
Question 17 Multiple Choice (Single Answer)

Which of the following DB2 Products can only be installed on a System I server ?

  1. DB2 for z/OS
  2. DB2 for i5/OS
  3. DB2 Data Warehouse Edition
  4. DB2 Enterprise Server Edition
Question 18 Multiple Choice (Single Answer)

Which of the following tools can be used to automate table reorganization operations?

  1. Control Center
  2. Command Center
  3. Command Line Processor
  4. Task Center
Question 19 Multiple Choice (Single Answer)

Which of the following is NOT a valid method of authentication that can be used by DB2 9?

  1. SERVER
  2. CLIENT
  3. DCS
  4. SERVER_ENCRYPT
Question 20 Multiple Choice (Single Answer)

Which authority or privilege is granted by the DB2 Database Manager configuration file?

  1. CONNECT
  2. CONTROL
  3. SYSMAINT
  4. EXECUTE