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.
Questions
select round(139.898,-2),round(188.898,-2) from dual would results in?
- 139.89,188.89
- 100,200
- -139.89,-188.89
- 140,189
state true or false can we apply Round() to the column whose datatype is declared as DATE?
- True
- False
select substr('DECCANPARK',-5,6) FROM DUAL
- ERROR
- NPARK
- DECCAN
- NULL
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;
- You obtain the results retrieved from the public synonym HR created by the DBA.
- You obtain the results retrieved from the HR table that belongs to you schema.
- You get an error message because you cannot retrieve from a table that has the same name as a public synonym.
- You obtain the results retrieved from both the publich synonym HR and the HR table that belongs to your schema, as a Cartesian product.
What is the result of the query "Select length(to_char(to_date(11032007,'ddmmyyyy'),'March')) from dual;" ?
- 3
- 5
- 9
- Error
When we use DISTINCT keyword in a SELECT query it will sort the output by the column-name we specified in the DISTINCT clause.
- True
- False
The output of the query " Select length(to_char(2000,'9999')) from dual; " is 4.
- True
- False
The output of the query " Select length(substr('SQL Functions',-10,12)) from dual; " is
- 12
- 10
- 13
- error
The REPLACE function in SQL replaces the data in the database and displays it as output.
- True
- False
The output of the query "select sign(abs(-88)) from dual;" is
- -
- +
- 0
- 1
- None of the above
The output for the qyery "select lpad('sql functions',18,'*#$') from dual;" is
- *#\$*#\$sql function
- error
- *#$*#sql functions
- None of the above
The output of the query " select instr('I''m an expert in oracle','d',-1,1) from dual; " is
- 1
- error
- null
- 0
The output of the query "select length('This is Ram''s book') from dual; " is
- 18
- 19
- 21
- none of the above
The output of the query " select instr('I am an expert in sql functions','n',-10,2) from dual; " is
- 30
- 7
- 2
- 10
The output of the query " select translate('123456789','235','xy') from dual; " is
- 1x4y6789
- 1xy456789
- 1xy46789
- error
The output of the query " select translate('123456789','235','xy') from dual; " is
- 1x4y6789
- 1xy456789
- 1xy46789
- error
Which of the following DB2 Products can only be installed on a System I server ?
- DB2 for z/OS
- DB2 for i5/OS
- DB2 Data Warehouse Edition
- DB2 Enterprise Server Edition
Which of the following tools can be used to automate table reorganization operations?
- Control Center
- Command Center
- Command Line Processor
- Task Center
Which of the following is NOT a valid method of authentication that can be used by DB2 9?
- SERVER
- CLIENT
- DCS
- SERVER_ENCRYPT
Which authority or privilege is granted by the DB2 Database Manager configuration file?
- CONNECT
- CONTROL
- SYSMAINT
- EXECUTE