Oracle Database and PL/SQL Fundamentals

Test your knowledge of Oracle database concepts including PL/SQL programming, SQL queries, views, cursors, functions, and database administration fundamentals.

17 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which initialization parameter specifies the location of the alert log file

  1. UTL_FILE_DIR
  2. USER_DUMP_DEST
  3. LOG_ARCHIVE_DEST
  4. BACKGROUND_DUMP_DEST
Question 2 Multiple Choice (Multiple Answers)

GRANT select, insert, update ON student_grades TO manager WITH GRANT OPTION;

  1. MANAGER must be a role.
  2. It allows the MANAGER to pass the specified privileges on to other users.
  3. It allows the MANAGER to create tables that refer to the STUDENT_GRADES table.
  4. It allows the MANAGER to apply all DML statements on the STUDENT_GRADES table.
  5. It allows the MANAGER the ability to select from, insert into, and update the STUDENT_GRADES table.
  6. It allows the MANAGER the ability to select from, delete from, and update the STUDENT_GRADES table.
Question 3 Multiple Choice (Single Answer)

Which best describes an inline view?

  1. A Schema Object
  2. A subquery that can contain an ORDER BY clause
  3. Another name for a view that contains group functions
  4. A subquery that is part of the FROM clause of another query
Question 4 Multiple Choice (Multiple Answers)

Which three are true?

  1. A MERGE statement is used to merge the data of one table with data from another.
  2. A MERGE statement replaces the data of one table with that of another.
  3. A MERGE statement can be used to insert new rows into a table.
  4. A MERGE statement can be used to update existing rows in a table.
Question 5 Multiple Choice (Multiple Answers)

Which four are types of functions available in SQL?

  1. String
  2. Character
  3. Integer
  4. Date
  5. Numeric
  6. Conversion
Question 6 Multiple Choice (Single Answer)

Find the error in the line for the query written below?

  1. Line 1
  2. Line 2
  3. Line 3
  4. Line 4
Question 7 Multiple Choice (Multiple Answers)

Which of the following are correct for a view

  1. a. View is a named SQL query stored in data dictionary
  2. b. View is a database object which stores data
  3. c. View is used for data hiding
  4. d. Views doesn’t occupy memory
Question 8 True/False

Can we apply update, insert or delete on a view?

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

How many columns are there in dual table?

  1. 1
  2. 2
  3. >1
  4. N
Question 10 Multiple Choice (Single Answer)

There are 10 rows in Table A and 0 Rows in table B. Select * from A,B How many rows will be retrieved.

  1. 1
  2. 0
  3. 10
  4. None of the above
Question 11 Multiple Choice (Multiple Answers)

There is a % sign in one field of a column. Say for example table test_chk has a column name1 which contains a value “desdf%dsf”. What will be the queries to find it?

  1. SELECT * FROM test_chk ;
  2. select * from test_chk where name1 like '%%%' escape ''
  3. select * from test_chk where name1 like ' \ ' escape '';
  4. select * from test_chk where name1 like '%!%%' escape '!'
Question 12 Multiple Choice (Multiple Answers)

There is a % sign in one field of a column. Say for example table test_chk has a column name1 which contains a value “desdf%dsf”. What will be the queries to find it?

  1. SELECT * FROM test_chk ;
  2. select * from test_chk where name1 like '%%%' escape ''
  3. select * from test_chk where name1 like ' \ ' escape '';
  4. select * from test_chk where name1 like '%!%%' escape '!'
Question 13 True/False

Can a function have an out parameter?

  1. True
  2. False
Question 14 True/False

Can you add not null column to a table already containing data ?

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

Say for e.g. we declare x char(20): = 'name' and y varchar2(20):='name' If we compare x and y then what should be the result?

  1. Both values will be equal
  2. Both values will not be equal
  3. You can’t compare these two values
  4. Both will be NULL
Question 16 Multiple Choice (Multiple Answers)

In PL/SQL if we write select statement with INTO clause which of the following exceptions are returned

  1. NO_DATA_FOUND
  2. ROWTYPE_MISMATCH
  3. TOO_MANY_ROW
  4. DUP_VAL_ON_INDEX
Question 17 Multiple Choice (Single Answer)

Without closing the cursor, If you want to open it what will happen. If error, get what is the error?

  1. INVALID_CURSOR
  2. CURSOR_ALREADY_OPEN
  3. TIMEOUT_ON_RESOURCE
  4. SYS_INVALID_ROWID