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 pl/sql table? Why it is used?

0 Answers  


How do I sort a table in sql?

0 Answers  


What is compiled query?

0 Answers  


What is the difference between union and union all command?

0 Answers  


What is the Query to print out the individual total number of duplicate row in sql.

5 Answers   TCS,






What is the best strategy to use COMMIT in a pl/sql loop?

3 Answers  


Write a query to find the employees from EMP table those who have joined in Monday. (there is a column as hiredate which is a date column i.e values are like 03-DEC-81)

5 Answers  


what are the advantages and disadvantages of views in a database? : Sql dba

0 Answers  


How to avoid using cursors?

0 Answers  


How do I start pl sql?

0 Answers  


What is sorting in sql?

0 Answers  


Is there a pl/sql pragma similar to deterministic, but for the scope of one single sql select?

0 Answers  


Categories