Oracle SQL/PLSQL Questions & Answers4

Oracle SQL/PLSQL Questions & Answers:

Explain in detail use of OCI in oracle?

OCI is an API that provides functions you can use to access the database server and control SQL execution. OCI supports the data types, calling conventions, syntax, and semantics of the C and C++ programming languages. You compile and link an OCI program much as you would any C or C++ program.

 Oracle function can take OUT parameter?

Yes we use OUT parameter in function.

 In form Parameter can we define default value?

Yes you can define initial value in form parameter.

 What is the difference between NO_DATA_FOUND and %NOTFOUND?

“NO_DATA_FOUND” is a system defined exception. It is generated when no record found in implicit cursor. “%NOTFOUND” is used in cursor. If cursor returns no row then %NOTFOUND returns true and if returns row then %NOTFOUND is false.

 Write a statement to find out the no. of rows in oracle?

Select count(*) from emp;

 Which function is use for display the numeric figure in words?

SELECT TO_CHAR(TO_DATE(123,'J'),'JSP') to_words FROM   dual;

What is the difference between WHERE clause and HAVING clause?

WHERE clause use in simple select statement on the other hand HAVING clause use in group function statement like.

Select emp_name from  WHEER dept_code=123;

Select emp_name from emp HAVING count(emp_cod) > 2;

 Write a difference between SUBSTR and INSTR function?

SUBSTR provide some portion of string like from one word to 5th word and INSTR gives us location   of that particular word.

  Back (Page 3)                   Next (Page 5)

 Other Related Questions & Answers: