0

databases Online Quiz - 98

Description: databases Online Quiz - 98
Number of Questions: 20
Created by:
Tags: databases
Attempted 0/20 Correct 0 Score 0
  1. The two statements produce identical results.

  2. The second statement returns a syntax error.

  3. There is no need to specify DESC because the results are sorted in descending order by default.

  4. The two statements can be made to produce identical results by adding a column alias for the salary column in the second SQL statement.


Correct Option: A

You would like to display the system date in the format "Monday, 01 June, 2001". Which SELECT statement should you use?

  1. SELECT TO_DATE(SYSDATE, 'FMDAY, DD Month, YYYY') FROM dual;

  2. SELECT TO_CHAR(SYSDATE, 'FMDD, DY Month, 'YYY') FROM dual;

  3. SELECT TO_CHAR(SYSDATE, 'FMDay, DD Month, YYYY') FROM dual;

  4. SELECT TO_CHAR(SYSDATE, 'FMDY, DDD Month, YYYY') FROM dual;

  5. SELECT TO_DATE(SYSDATE, 'FMDY, DDD Month, YYYY') FROM dual;


Correct Option: C
  1. SELECT SUBSTR( ‘Hello World’,1) FROM dual;

  2. SELECT INITCAP(TRIM (‘Hello World’, 1,1)) FROM dual;

  3. SELECT LOWER(SUBSTR(‘Hello World’, 1, 1) FROM dual;

  4. SELECT LOWER(SUBSTR(‘Hello World’, 2, 1) FROM dual;

  5. SELECT LOWER(TRIM (‘H’ FROM ‘Hello World’)) FROM dual;


Correct Option: E
  1. The value displayed in the CALC_VALUE column will be lower.

  2. The value displayed in the CALC_VALUE column will be higher.

  3. There will be no difference in the value displayed in the CALC_VALUE column.

  4. An error will be reported.


Correct Option: C
  1. /SQL*Plus commands cannot be abbreviated.

  2. /SQL*Plus commands are accesses from a browser.

  3. /SQL*Plus commands are used to manipulate data in tables.

  4. /SQL*Plus commands manipulate table definitions in the database.

  5. /SQL*Plus is the Oracle proprietary interface for executing SQL statements.


Correct Option: C,D
  1. The indexed column is declared as NOT NULL.

  2. The indexed columns are used in the FROM clause.

  3. The indexed columns are part of an expression.

  4. The indexed column contains a wide range of values.


Correct Option: D
  1. ORDER BY SALARY > 5000

  2. GROUP BY SALARY > 5000

  3. HAVING SALARY > 5000

  4. WHERE SALARY > 5000


Correct Option: D
  1. Must begin with either a number or a letter.

  2. Must be 1-30 characters long.

  3. Should not be an Oracle Server reserved word.

  4. Must contain only A-Z, a-z, 0-+, _, *, and #.

  5. Must contain only A-Z, a-z, 0-9, _, $, and #.

  6. Must begin with a letter.


Correct Option: B,C,E,F

You need to display the last names of those employees who have the letter “A” as the second character in their names. Which SQL statement displays the required results?

  1. SELECT last_name FROM EMP WHERE last_name LIKE ‘_A%’;

  2. SELECT last_name FROM EMP WHERE last name =’*A%’

  3. SELECT last_name FROM EMP WHERE last name =’_A%’;

  4. SELECT last_name FROM EMP WHERE last name LIKE ‘*A%’


Correct Option: A
  1. Exiting from SQL*Plus

  2. System crashing

  3. Issue of GRANT or CREATE command

  4. None of the above


Correct Option: D
  1. A table name can duplicate the name of any other database object, if not owned by same user.

  2. Table names can contain $,_, and # signs.

  3. Table names are case-sensitive.

  4. Table names begin with a letter.

  5. Table names are not created in Uppercase by default.


Correct Option: A,B,D
  1. CREATE VIEW empl_vu AS SELECT * FROM employee WHERE sal > 10000 WITH READ ONLY;

  2. CREATE VIEW empl_vu AS SELECT * FROM employee WHERE sal > 10000 WITH CHECK OPTION;

  3. CREATE VIEW empl_vu AS SELECT * FROM employee WHERE sal > 10000 WITH CHECK CONSTRAINT;

  4. None of the above


Correct Option: A
  1. DELETE

  2. SELECT

  3. CREATE TABLE

  4. UPDATE

  5. DROP TABLE


Correct Option: C,E
- Hide questions