What is difference between select statement and cursor
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
What is primary key and unique key?
How do I view output in sql developer?
what is a join? : Sql dba
How you will create Toad Function?
Does db2 use sql?
What is a temporal table?
how to extract a unit value from a date and time? : Sql dba
How do you update a value in sql?
What is INSTEAD OF trigger ?
Does access use sql?
Explain some predefined exceptions.
What is difference between TRUNCATE & DELETE?
16 Answers Ahn Infotech, CitiGroup, ICICI, PreVator, Saama Tech, SkyTech, TCS,