What are the two parts of a procedure ?
Answers were Sorted based on User's Feedback
Answer / chakri
Syntax of procedure :
CREATE OR REPLACE PROCEDURE proce_name (Arg list)
IS
LOCAL VARIBLE DECLARATION
BEGIN
----------
----------
---------
END;
In the about syntax
Up to IS key word called as Procedure Header and
Remaining Part is called as Procedure Body.
Is This Answer Correct ? | 5 Yes | 0 No |
Answer / kirankumar.vangeti
create or replace procedure procedure_name as
Declare
/* Declarative section: variables, types, and local sub
programs */
Begin
/* Executable section: Procedural and sql statements go
here */
Exception
/* exception handling section: error handling statements go
here */
End;
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / a.jyothsna
Procedure specification: create or replace procedure proc-nm
(agumentlist)
procedure body: is-------------end
Is This Answer Correct ? | 2 Yes | 5 No |
How can you tell the difference between an index and a view?
how to find 5th row ?
What is Materialized View? In What Scenario we Use Materialized View?
how to check the 3rd max salary from an employee table? One of the queries used is as follows: select sal from emp a where 3=(select count(distinct(sal)) from emp b where a.sal<=b.sal). Here in the sub query "select count(distinct(sal)) from emp b where a.sal<=b.sal" or "select count(distinct(sal)) from emp b where a.sal=b.sal" should reveal the same number of rows is in't it? Can any one here please explain me how is this query working perfectly. However, there is another query to get the 3rd highest of salaries of employees that logic I can understand. Pls find the query below. "select min(salary) from emp where salary in(select distinct top 3 salary from emp order by salary desc)" Please explain me how "select sal from emp a where 3=(select count(distinct(sal)) from emp b where a.sal<=b.sal)" works source:http://www.allinterview.com/showanswers/33264.html. Thanks in advance Regards, Karthik.
Why do we use subquery?
Why query optimization is needed?
how to create a new table in mysql? : Sql dba
What is Overloading of procedures ?
Can we connect to postgresql using sql developer?
Can we insert data into materialized view?
How can multiply values of a column? OR How can multiply value of a row of a column using a single query in SQL?
why should required nested tables, Object types, partition tables and varying arrays. what is the difference between these are all. give me example with explanation.