Sie sind auf Seite 1von 2

1. Whats the command to see the current user name? 2. Sql> show user; 3.

Whats the command to change the SQL prompt name? SQL> set sqlprompt database-1 > database-1 > database-1 > 4. How do you switch to DOS prompt from SQL prompt? SQL> host 5. How do I eliminate duplicate rows in an Oracle database? SQL> delete from table_name where rowid not in (select max(rowid) from table group by duplicate_values_field_name); or SQL> delete duplicate_values_field_name dv from table_name ta where rowid < (select min(rowid) from table_name tb where ta.dv=tb.dv); 6. How do I display row number with records? Use the row-num pseudocolumn with query, like SQL> select rownum, ename from emp; 7. How do you display the records within a given range? select rownum, empno, ename from emp where rowid in (select rowid from emp where rownum < =&rangeend minus select rowid from emp where rownum<&rangebegin); 8. The NVL function only allows the same data type. But heres the task: if the commission field is null, then the text Not Applicable should be displayed, instead of blank space. How do you write the query? SQL> select nvl(to_char(comm.),Not Applicable) from emp; 9. Explain explicit cursor attributes. There are four cursor attributes used in Oracle: cursor_name%Found, cursor_name%NOTFOUND, cursor_name%ROWCOUNT, cursor_name%ISOPEN 10. Explain implicit cursor attributes. Same as explicit cursor but prefixed by the word SQL: SQL%Found, SQL%NOTFOUND, SQL%ROWCOUNT, SQL %ISOPEN 11. How do you view version information in Oracle? SQL> select banner from $version;

No answers, but these are useful questions for conducting Oracle interview. The readers are welcome to contribute their answers. 1. What is an oracle instance? 2. What is a view? 3. What is referential integrity? 4. Name the data dictionary that stores user-defined constraints? 5. What is a collection of privileges? 6. What is a snapshot? 7. What is a synonym? 8. What is a cursor? 9. What is a sequence? 10. What is a trigger? 11. What is an exception? 12. What is a partition of table? 13. What are pseudo-columns in SQL? Provide examples. 14. What are the Data Control statements? 15. What is a schema? 16. What is a type? 17. What is a data model? 18. What is a relation? 19. Advantages of redo log files? 20. What is an Archiver? 21. What is a database buffer cache? 22. What are the background processes in Oracle? 23. %type and %rowtype are attributes for? 24. What are the steps in a two-phase commit? 25. What is a union, intersect, minus? 26. What is a join, explain the types of joins? 27. What is a co-related sub-query? 28. ODBC stands for? 29. Data-type used to work with integers is? 30. Describe data models? 31. Describe the Normalization principles? 32. What are the types of Normalization? 33. What is de-normalization?

Das könnte Ihnen auch gefallen