Oracle Database and SQL Fundamentals
Covers Oracle database concepts including SQL*Plus commands, sequences, views, indexes, background processes, and DML operations.
Questions
Consider the following SELECT statement: SELECT dept_no "Departments", MAX(salary) "Max Salaries" FROM employee WHERE dept_no IN(200, 300, 400) GROUP BY Departments HAVING MAX(salary) > 60000; Due to which clause does this statement fail?
- Group By
- Where
- Select
- Having
Which SQL statement is used to extract data from a database?
- OPEN
- GET
- SELECT
- EXTRACT
Did row migration is caused by less pctfree space in datablock ?
- True
- False
Which background processes is not mandatory in Oracle server?
- ARCH
- PMON
- SMON
- RECO
We can not remove a row from view, if it contains
- Group functions
- Group by clause
- Distinct keyword
- All of above
We can not remove a row from view, if it contains
- Group functions
- Group by clause
- Distinct keyword
- All of the above
On dropping a view
- respective table data is retained
- data is deleted from table
- depends on conditions
- all of above
We can not modify data in view
- Group by clause
- Distinct keyword
- Pseudo column ROWNUM keyword
- All of above
Any attempt on DML operation on view
- Successful
- Results in error
- Depends on condition
- None
What is inline view
- Class object
- Schema object
- Both
- None of the above
Which is correct about an inline view
- It is query with alias name
- It is subquery with alias name
- Both
- None of the above
Sequence is basically used in generating
- Unique key
- Primary key
- Foreign key
- All of the above
Why cache option used in sequences
- To get automatic values
- For esay access
- For fast access
- All of the above
When we do not prefer to create index
- A column contains large no of values
- A column contains large no of null values
- Table is small
- When table is not updated frequently
Which is not right for Truncate Statement
- Deletes rows from table
- Removes storage space
- Removes table structure
- All of the above
What are different keys in oracle
- Candidate key
- Member key
- Both of above
- None of the above
How do you see current user name
- show user
- get user
- display user
- display
How to change SQL prompt name
- set sqlprompt “Ravi Kishore > “
- set prompt “Ravi Kishore > “
- set sql “Ravi Kishore > “
- set sqlpromt “Ravi Kishore > “
How to Switch to DOS prompt ?
- host
- DOS
- doshost
- dos host
How do I eliminate the duplicate rows ?
- delete from table_name where rowid not in (select max(rowid) from table group by duplicate_values_field_name);
- delete duplicate_values_field_name dv from table_name ta where rowid <(select min(rowid) from table_name tb where ta.dv=tb.dv);
- delete ename from emp a where rowid < ( select min(rowid) from emp b where a.ename = b.ename);
- Delete all