What is difference between select statement and cursor

Answers were Sorted based on User's Feedback



What is difference between select statement and cursor..

Answer / gudekotas

SELECT STATEMENT CONTAINS PARTICULAR STRUCTURE AND SELECT
QUERY RESULT SET CONTAINS ROWID,ROWNUM.

CURSOR DOESN'T CONTAIN STRUCTURE AND IT IS
VIRTUAL(CONTEXAREA)MEANS NO ROWID,NO ROWNUM.

Is This Answer Correct ?    11 Yes 2 No

What is difference between select statement and cursor..

Answer / bolearner

The above answer is not so correct.

cursor can fetch rowid, rownum also from table.

The select into cant retrieve more than 1 record in plsql.

But cursor can retrieve more records that can be viewed for modified later in plsql.

Cursors has attributes like open,close,fetch,notfound. Those attributes not applicable in select..into clause.

finally select..into in plsql, just select column values and storing into plsql variable.

Is This Answer Correct ?    6 Yes 1 No

What is difference between select statement and cursor..

Answer / akash

Using select..into statement u cannot fetch more than 1 rows.
Beside naming the same select statement as cursor explicitly allows user to options like OPEN,CLOSE,FETCH.

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

what is the main difference between join and subqurey?

3 Answers   Oracle,


What are the different types of PL/SQL program units that can be defined and stored in ORACLE database ?

2 Answers  


What can be a size of a pl/sql block? Is there any limit?

2 Answers  


what is the maximum length of a table name, database name, and fieldname in mysql? : Sql dba

0 Answers  


Which tcp/ip port does sql server run?

0 Answers  






How do I turn a list into a table?

0 Answers  


Can a table contain multiple foreign key’s?

0 Answers  


How many types of keys are there in sql?

0 Answers  


What is the relation b/w view and trigger

3 Answers   Accenture, TCS,


What are the different types of functions in sql?

0 Answers  


Explain what is a view?

0 Answers  


How to execute a stored procedure?

0 Answers  


Categories