Can you have multiple SPs with the same name on a database?
Answers were Sorted based on User's Feedback
Answer / jithendranath.g
both above answers are correct,but situvationd diff
1) we can't create same db obj with same name,
2) we want that go for packages ,with overloading concept
Is This Answer Correct ? | 14 Yes | 0 No |
Answer / baba
When we create a stored procedure,if db object already
exists we will get a message that
ERROR at line 1:
ORA-00955: name is already used by an existing object
Is This Answer Correct ? | 10 Yes | 1 No |
Answer / ashok
IT WILL ONLY POSSIBLE FOR IN THE PACKAGE.
EX--
CREATE OR REPLACE PACKAGE PK_TEST AS
PROCEDURE PR_SHOW();
PROCEDURE PR_SHOW(V_NAME VAR CHAR);
END PK_TEST;
Is This Answer Correct ? | 5 Yes | 0 No |
Answer / suman
Hi ,
As per standard Procedure & Function we cannot create same name of Procedure but if you are using in Package you can have same name with different parameter.
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / harsha
Yes We can have multiple SP's with same name.This is called
overloading a Procedure with different parameters.
e.g. CREATE PROCEDURE COMPUTE_AREA (LENGTH IN NUMBER,
WIDTH IN NUMBER);
CREATE PROCEDURE COMPUTE_AREA (LENGTH IN NUMBER,
WIDTH IN NUMBER
UNITS IN NUMBER);
Is This Answer Correct ? | 4 Yes | 6 No |
Answer / thra
yes procedure can have same name overloading differ in data
type ....etc;
Is This Answer Correct ? | 2 Yes | 5 No |
What is cascade in sql?
What are secondary keys?
What is function and procedure?
What is data types in sql?
how to retrive only second row from table?
what is meant by urlencode and urldocode? : Sql dba
Hi, Can anybody please explain me the flow of the below query. I am not able to understand how this query works. This query is for finding the Nth highest salary.. SELECT DISTINCT (a.sal) FROM EMP A WHERE &N = (SELECT COUNT (DISTINCT (b.sal)) FROM EMP B WHERE a.sal<=b.sal); If N = 2 then second highest salary will be the o/p. If N = 3 then third highest salary will be the o/p. and so on.. Thanks, Nitin
5 Answers Deloitte, Ness Technologies,
how to insert values like 10:10:00,30:25:00 etc.into table after insert how can i sum the above insert values to get the result as 40:35:00
which operator is used in query for pattern matching? : Sql dba
Explain commit, rollback and savepoint.
how many tables will create when we create table, what are they? : Sql dba
What schema means?