Você está na página 1de 5

SQL

1. What are the different types of statements we have? Explain? 2. What is the difference between char and varchar2? Explain with example? 3. What is the difference between Commit and Roll back? 4. What is the difference between Delete and Drop? 5. What is the difference between Truncate and Delete? 6. What is the difference between Truncate and Drop? 7. What is the difference between DML and DDL statements? 8. What is the user? 9. On which statements I can give the permissions to other user? 10.What is the output for select empno,1,2 from emp? 11.What is the output for select * from emp where 1=1? 12.What is the output for select * from emp where 1=2? 13.I want to print empno, ename, sal in the single column. How you can do it? 14.I want see the column name as employee number instead of empno while retrieving? How you can do it? 15.Extract the employee details whose salary is null? 16.What is the dual table when you can use this one? 17.What is the structure of the dual table? 18.Can I modify the dual table? 19.What are the different types of functions we have? 20.What is the difference between single and Multi row functions? 21.What are the different types of single row functions? 22.What is the difference between substr and instr? 23.What is the difference between Translate and Replace? 24.What is the difference between case and Decode? 25.What is the difference between ceil and floor? 26.What is the difference between round and trunc functions? 27.What are different types of conversion functions we have? 28.What is the difference between NVL and NVL2? 29.Explain about nullif and coalesce? 30.What are the different multirow (Group Functions) functions we have? 31.What is the group by clause? When you can use it? 32.What is having clause? What is the difference between Where and Having clause? 33.What are the different types of joins we have? 34.What is the self join? 35.What is the outerjoin? 36.What is the subquery? How many types of sub queries we have? 37.What is the inline view? 38.What are the set operators? Name the different set operators and explain? 39.What is the difference between union and union all? 40.What is the difference between Cube and Rollup? 41.What is the constraint?

42.What are the different types of constraints we have? Explain? 43.What is the difference between unique and primary key? 44.What is the difference between notnull and Primary key? 45.What is the difference between On delete cascade and on delete set null? 46.How to disable and enable the constraints? 47.How to drop the constraints? 48.Which table holds the constraint details? 49.What are the different types of database objects we have? 50What is the view? 51.With out table can I create view? How? 52.What are the different types of views? 53.I should not do DML operations through the view? How can I do? 54.At which conditions I cant modify the view? 55.What is the sequence? How you can access the Sequence? 56.What are the pseudo columns? 57.What is the synonym? Explain when you can use it? 58.What is the difference between Rownum and Rowid? 59.What is the Index? 60.What is the Materialized view? When you can use it? 61.What is the difference between View and Materialized view? 62.What is the difference between Rowid and Rownum? 63.I have created view, sequence, synonym and sequence on one table. I have dropped the table.Then what will happen to database objects? 64.Extract the employee details whose salary is greater than their dept avg sal? 65.Find out how many as are in your name? 66.Extract the employee details whose empid contains only numbers or only alphabets. 67.Extract the employee details whose name contains min 2 as 68.Extract the employee details whose name contains only 2 as 69.Extract the top 2 salaries, least 2 salaries, top 2nd salary and least 2nd salary using rownum,Normal sub query and correlated sub queries? 70.Extract the duplicated Empno details? 71.Extract empno, ename, deptno, sal +total sal of all the employees+dept avg sal in single query? 72.Emp1-empno-1,2,34 ......emp2-empno-2,3,4,4,4,6,7 Select empno from emp1 Union Select empno from emp2. What is the output of this query? 73. Emp1-empno-1,2,34 ................emp2-empno-2,3,4,6,7 I want get all the empno from both the tables sort in empno order? 74.I have created one table emp1 with the column empno. I have inserted the data 1, 2 . Again I have created one table emp2 with the column empno.I have inserted 3, 4

then I have done exit from the user. Again I have login into user. Now I am querying data form emp1 and emp2.What is the Result (Can I get data from both the tables)?

PLSQL

1.What is the difference between SQL and SQL * Plus? 2.What is the Dbms_output.put_line and Set serveroutput on? 3.What is the difference between bind variable and host variable? 4.What is the cursor? 5.What are the different types of cursors? 6.Explain the implicit and explicit cursor attributes? 7.What is the value of %isopen in the implicit cursor? 8.Explain the program to display all the employee details using cursor FOR loop. If there is no data in the table then print the message as There is no data in the table.Without using the cursor print the data from emp table. Can I test cursor Attributes in this case? 9.What is the parameterized cursor? Explain one scenario where exactly you have used it? 10.What is the cursor variable (Ref Cursor)? Explain the advantages of it? 11.What is the difference between weak and Strong ref cursors? 12. Emp1 Emp2 a. 1000 2 5000 b. 2000 4 1000 c. 3000 7 4000 d. 4000 8 2000 Explain the program to Update the emp2 table employees salary with emp1 table emps salary if employees are matched ie for (2,4). If not matched insert the rows (1,3) into emp2. Print no. of rows updated in emp2 table Print no. if rows inserted into emp2 table 13.What are the different types of locks we have? Which table holds the locks details? 14.What is the select..for update? 15.What is the no wait option? 16.What is where current of? 17.What are the different types of Exceptions we have? Explain? 18.What is the Pragma? 19.What is Non predefined exceptions? Explain why we need to use it? 20.When you can use the user defined exceptions? 21.If select statement failed to fetch the row what is the status of the program?

22.If Update statement fails, will it raise any exception? 23.What is when others handler? 24.What is the sqlerrm and sqlcode? 25.Can I write only others handler in the exception section? 26.Can I write first exception handler as others handles among five handlers? 27.What is the raise_application_error? When we can use this? 28.What is the difference between raise_application_error and Dbms_output.put_line? 29.Explain how to raise the exception if update statement fails to effect the rows? 30.Can I write the begin section in the exception section? 31.Declare declare V1 number:=ABC; ---Begin Begin ---- Raise A; Exception Exception When others then When A then Dbms_output.put_line(1) Raise B; End; When B then Dbms_output.put_line(1) End; What is the output for the above programs? Will it be completed successfully or error out. If error out then rectify the code to complete successfully. 32.What is the procedure? 33.Write the syntax and execution for the out and in out parameters in the procedures? 34.What is the difference between Procedure and Function? 35.Explain some scenarios where exactly you have used the functions in your real time? 36.Can I return more then one value from function? 37.Can I write more than one return in function? 38. Create or replace function exe is Return 1 Return2 Return3 -----Till which return, statements will be executed? 39.Can I call a function in select statement? If yes then explain the syntax? 40.I want display ename, sal*12 from emp table. But instead of writing sal*12 use the function to display then Sal*12 results for particular employee? 41.If there are DML statements in a function then ,can I call that function in sql statements? 42.How can return more than one column value in the function?

43.What is the package? 44.What is the Package Specification and Body? 45.Without body can I have specification? 46.Without Specification can I have body? 47.I have declared four procedures in the specification? Can I use only 3 procedures in the body? 48.What is the difference between declaring the variable in the Package and in the procedure? 49.Can I declare more than one procedure with the same name? 50.What is the Over Loading? 51.What is the trigger? How many types we have? 52.What is the DML Trigger? How many types we have? 53.Can I use the commit inside the trigger? If I use what will happen? If I want use the commit how can I use? 54.What is the mutating error? Explain one scenario when you get this? And how you can rectify it? 55.What are the correlation identifiers? 56.What is the Difference between for each row and statement level triggers? 57.What is the system triggers? 58.I should not Perform DML operations on the emp table in weekends. Explain how we can achieve this? 59.What is the Autonomous Transaction? How you can declare one block as a Autonomous Transaction? 60.Without commit or rollback can I write a Autonomous Transaction Block? 61.What is the Dynamic Sql? 62.How you can implement the Dynamic Sql? 63.What are different composite types? Explain? 64.What is the difference between %type and %rowtype? 65.What is the difference between Record type and Table Types? 66.What is the difference between Index by table and Nested table? 67.What are the collection methods? 68.What is the Bulk collect? 69.Delete the duplicate rows bases on the empno,empname.

Você também pode gostar