Database Fundamentals and Oracle SQL
Test your knowledge of Oracle database concepts, SQL functions, constraints, privileges, and data management
Questions
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?
- The SQL*Plus Keyword.
- The username
- The password
- The database name
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?
- 17000.00
- 17000*****
- ****170.00
- **17000.00
- an error statement
For which action can you use the TO_DATE function?
- Convert any date literal to a date
- Convert any numeric literal to a date
- Convert any character literal to a date
- Convert any date to a character literal
- Format ’10-JAN-99’ to ‘January 10 1999’
Which one is a system privilege?
- select
- delete
- execute
- alter table
- create table
Which two are types of functions available in SQL?
- String
- Character
- Integer
- Calander
- Numeric
- Translation
Which two statements are true about constraints?
- The UNIQUE constraint does not permit a null value for the column.
- A UNIQUE index gets created for columns with PRIMARY KEY and UNIQUE constraints.
- The PRIMARY KEY and FOREIGN KEY constraints create a UNIQUE index.
- The NOT NULL constraint ensures that null values are not permitted for the column.
The user Alice wants to grant all users query privileges on her DEPT table. Which SQL statement accomplishes this?
- GRANT select ON dept TO ALL_USERS;
- GRANT select ON dept TO ALL;
- GRANT QUERY ON dept TO ALL_USERS;
- GRANT select ON dept TO PUBLIC;
Which constraint can be defined only at the column level?
- Unique
- Not null
- Check
- Primary key
- Foreign key
Which best describes an inline view?
- a schema object
- a subquery that can contain an ORDER BY clause
- another name for a view that contains group functions
- a subquery that is part of the FROM clause of another query
The DBA issues this SQL command: CREATE USER scott IDENTIFIED by tiger; What privileges does the user Scott have at this point?
- no privileges
- only the SELECT privilege
- only the CONNECT privilege
- all the privileges of a default user
Which is iSQL*Plus commands?
- Insert
- Update
- Select
- Describe
- Delete
- Rename
Which SQL statement returns a numeric value?
- SELECT ADD_MONTHS(MAX(hire_Date), 6) FROM EMP;
- SELECT ROUND(hire_date)FROM EMP;
- SELECT sysdate-hire_date FROM EMP;
- SELECT TO_NUMBER(hire_date + 7)FROM EMP;
Which object privileges can be granted on a view?
- none
- DELETE, INSERT,SELECT
- ALTER, DELETE, INSERT, SELECT
- DELETE, INSERT, SELECT, UPDATE
Top N analysis requires _____ and _____.
- the use of rowed
- a GROUP BY clause
- an ORDER BY clause
- only an inline view
- an inline view and an outer query
For which two constraints does the Oracle Server implicitly create a unique index?
- Not null
- Primary key
- Foreign key
- Check
- Unique
What is generally the most efficient way to join to join two tables in the same database?
- In the database
- using a source qualifier transformation
- using a joiner transformation
- his cannot be done in Power Center 8.x
To maximize session performance by filter it should be
- Near to source
- Near to target
- Can be placed anywhere
- (i)Session performance is not affected
Which of the following transformation is passive and connected?
- Aggregator
- Expression
- Joiner
- Filter
Which of the below transformation can be used as connected and unconnected both way?
- Stored procedure, Look up
- Stored procedure, filter
- Look up , joiner
- Filter, Expression
Which of the following task can be made reusable?
- Session
- Command
- Email
- All of the above