I need to write a simple query,which one is better select
statement or stored procedure?and why?

Answers were Sorted based on User's Feedback



I need to write a simple query,which one is better select statement or stored procedure?and why?..

Answer / sudipta santra

A simple query because through query we can throw the result
of the data based on conditions but in stored procedure we
can not , as the procedure is used for the specific time
based for the specific value return through out/IN out .

A simple query is best. But it is wrong that we can not do
through a proc, we can do but the effort will take more.

Is This Answer Correct ?    5 Yes 1 No

I need to write a simple query,which one is better select statement or stored procedure?and why?..

Answer / john

simple query s best as we can issue query by giving various
condition and it will not get stored in database where as a
procedure will get stored in database and gotta occupy
memory.so its waste of memory and time to create a
procedure rather than issuing a si9ngle query

Is This Answer Correct ?    4 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

What are the advantages of pl sql over sql?

0 Answers  


What is the difference between unique and primary key constraints?

0 Answers  


What can you do with pl sql?

0 Answers  


What is the difference between count 1 and count (*) in a sql query?

0 Answers  


one of the column in my table contains the data like SAL ---- 1000 1000 2000 3000 3000 So my requirement is i want output like SAL --- 1000 2000 3000 it mean i want to delete duplicate rows in the table permanently and i want output in the above formatow should u write query?

13 Answers   Cap Gemini, TCS,






There is a table, In one column it has implemented a index, but the index is disturbed by the regular dml statements.. but still we need to keep the index. how it is possible?

1 Answers   Cognizant,


Create a procedure to delete certain records from a table and display the total number of records deleted in this process. (Condition for deletion can be of ur choice, for instance delete all records where eid='')

2 Answers  


what is myisam? : Sql dba

0 Answers  


What is pl/sql language case sensitive?

0 Answers  


Define a temp table?

0 Answers  


What is the source code of a program?

0 Answers  


What is the difference between sql and isql*plus?

0 Answers  


Categories