0

databases Online Quiz - 192

Description: databases Online Quiz - 192
Number of Questions: 20
Created by:
Tags: databases
Attempted 0/20 Correct 0 Score 0

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


Correct Option: B

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

  1. True

  2. False


Correct Option: A

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

  1. ERROR

  2. NPARK

  3. DECCAN

  4. NULL


Correct Option: B

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.


Correct Option: B

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


Correct Option: C

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


Correct Option: A

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

  1. True

  2. False


Correct Option: B

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

  1. 12

  2. 10

  3. 13

  4. error


Correct Option: B

AI Explanation

To answer this question, let's break down the query step by step:

The query is:

Select length(substr('SQL Functions',-10,12)) from dual;
  1. The substr function is used to extract a substring from the given string 'SQL Functions'. The parameters are (string, start_position, length).
  2. In this case, substr('SQL Functions',-10,12) will extract a substring starting from the 10th position from the end (-10) and with a length of 12 characters. So, the extracted substring is ' Functions'.
  3. The length function is then applied to the extracted substring ' Functions', which returns the length of the string.
  4. Finally, the result of the query is the length of the extracted substring, which is 10.

Therefore, the correct answer is B) 10.

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

  1. True

  2. False


Correct Option: B

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

  1. -

  2. +

  3. 0

  4. 1

  5. None of the above


Correct Option: D

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


Correct Option: C

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


Correct Option: D

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


Correct Option: A

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


Correct Option: B

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

  1. 1x4y6789

  2. 1xy456789

  3. 1xy46789

  4. error


Correct Option: C

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

  1. 1x4y6789

  2. 1xy456789

  3. 1xy46789

  4. error


Correct Option: C

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


Correct Option: B

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


Correct Option: D

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


Correct Option: C

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

  1. CONNECT

  2. CONTROL

  3. SYSMAINT

  4. EXECUTE


Correct Option: C
- Hide questions