Database Fundamentals and Oracle SQL

Test your knowledge of Oracle database concepts, SQL functions, constraints, privileges, and data management

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

You want to use SQL*Plus to connect to the oracle database. Which of the following choices does not indicate a component you must specify when logging into the oracle?

  1. The SQL*Plus Keyword.
  2. The username
  3. The password
  4. The database name
Question 2 Multiple Choice (Single Answer)

Evaluate the SQL statement: SELECT LPAD (salary,10,*) FROM EMP WHERE EMP_ID = 1001; If the employee with the EMP_ID 1001 has a salary of 17000, what is displayed?

  1. 17000.00
  2. 17000*****
  3. ****170.00
  4. **17000.00
  5. an error statement
Question 3 Multiple Choice (Single Answer)

For which action can you use the TO_DATE function?

  1. Convert any date literal to a date
  2. Convert any numeric literal to a date
  3. Convert any character literal to a date
  4. Convert any date to a character literal
  5. Format ’10-JAN-99’ to ‘January 10 1999’
Question 4 Multiple Choice (Single Answer)

Which one is a system privilege?

  1. select
  2. delete
  3. execute
  4. alter table
  5. create table
Question 5 Multiple Choice (Multiple Answers)

Which two are types of functions available in SQL?

  1. String
  2. Character
  3. Integer
  4. Calander
  5. Numeric
  6. Translation
Question 6 Multiple Choice (Multiple Answers)

Which two statements are true about constraints?

  1. The UNIQUE constraint does not permit a null value for the column.
  2. A UNIQUE index gets created for columns with PRIMARY KEY and UNIQUE constraints.
  3. The PRIMARY KEY and FOREIGN KEY constraints create a UNIQUE index.
  4. The NOT NULL constraint ensures that null values are not permitted for the column.
Question 7 Multiple Choice (Single Answer)

The user Alice wants to grant all users query privileges on her DEPT table. Which SQL statement accomplishes this?

  1. GRANT select ON dept TO ALL_USERS;
  2. GRANT select ON dept TO ALL;
  3. GRANT QUERY ON dept TO ALL_USERS;
  4. GRANT select ON dept TO PUBLIC;
Question 8 Multiple Choice (Single Answer)

Which constraint can be defined only at the column level?

  1. Unique
  2. Not null
  3. Check
  4. Primary key
  5. Foreign key
Question 9 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 10 Multiple Choice (Single Answer)

The DBA issues this SQL command: CREATE USER scott IDENTIFIED by tiger; What privileges does the user Scott have at this point?

  1. no privileges
  2. only the SELECT privilege
  3. only the CONNECT privilege
  4. all the privileges of a default user
Question 11 Multiple Choice (Single Answer)

Which is iSQL*Plus commands?

  1. Insert
  2. Update
  3. Select
  4. Describe
  5. Delete
  6. Rename
Question 12 Multiple Choice (Single Answer)

Which SQL statement returns a numeric value?

  1. SELECT ADD_MONTHS(MAX(hire_Date), 6) FROM EMP;
  2. SELECT ROUND(hire_date)FROM EMP;
  3. SELECT sysdate-hire_date FROM EMP;
  4. SELECT TO_NUMBER(hire_date + 7)FROM EMP;
Question 13 Multiple Choice (Single Answer)

Which object privileges can be granted on a view?

  1. none
  2. DELETE, INSERT,SELECT
  3. ALTER, DELETE, INSERT, SELECT
  4. DELETE, INSERT, SELECT, UPDATE
Question 14 Multiple Choice (Multiple Answers)

Top N analysis requires _____ and _____.

  1. the use of rowed
  2. a GROUP BY clause
  3. an ORDER BY clause
  4. only an inline view
  5. an inline view and an outer query
Question 15 Multiple Choice (Multiple Answers)

For which two constraints does the Oracle Server implicitly create a unique index?

  1. Not null
  2. Primary key
  3. Foreign key
  4. Check
  5. Unique
Question 16 Multiple Choice (Single Answer)

What is generally the most efficient way to join to join two tables in the same database?

  1. In the database
  2. using a source qualifier transformation
  3. using a joiner transformation
  4. his cannot be done in Power Center 8.x
Question 17 Multiple Choice (Single Answer)

To maximize session performance by filter it should be

  1. Near to source
  2. Near to target
  3. Can be placed anywhere
  4. (i)Session performance is not affected
Question 18 Multiple Choice (Single Answer)

Which of the following transformation is passive and connected?

  1. Aggregator
  2. Expression
  3. Joiner
  4. Filter
Question 19 Multiple Choice (Single Answer)

Which of the below transformation can be used as connected and unconnected both way?

  1. Stored procedure, Look up
  2. Stored procedure, filter
  3. Look up , joiner
  4. Filter, Expression
Question 20 Multiple Choice (Single Answer)

Which of the following task can be made reusable?

  1. Session
  2. Command
  3. Email
  4. All of the above