adspace


in oracle 10g sw after compiling procedure how to pass
parameter values ,if we (v_empid out number)how to give
empid after successful compilation program.This site exact
suitable for 10g with respect to question & answer same
format , im trying sql browser & sql command prompt using
exec procedure name & respective parameters.

Answer Posted / Bhawana Yadav

To pass parameter values in a compiled Oracle PL/SQL procedure, you can use the EXECUTE statement. Here's an example:

```sql
DECLARE
v_empid NUMBER;
BEGIN
-- Compile and execute the stored procedure
EXECUTE procedure_name(v_empid OUT OUT_VARIABLE);
COMMIT;
-- Assign a value to v_empid
v_empid := 123456;
-- Re-execute the stored procedure with the assigned value
EXECUTE procedure_name(v_empid OUT OUT_VARIABLE);
END;
```
Replace `procedure_name`, `OUT_VARIABLE`, and the actual procedure definition according to your needs.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is inner join faster than left join?

1277


what is schema? : Sql dba

1147


what is bcp? When does it used? : Sql dba

1056


Can delete statement be rollbacked?

1054


what are aggregate and scalar functions? : Sql dba

1129


Can we rollback truncate?

1074


What is the current version of sql?

1094


What is your daily office routine?

2346


what are the advantages of sql ? : Sql dba

1142


Is primary key always clustered index?

1095


how to start mysql server? : Sql dba

1267


What is the current version of postgresql?

1178


how many tables will create when we create table, what are they? : Sql dba

1144


How do I remove duplicates in two columns?

1187


what is collation? : Sql dba

1229