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 are the data types allowed in a table?
What is the use of <> sql?
what is data integrity
what are the differences between procedure-oriented languages and object-oriented languages? : Sql dba
What are the types of join and explain each?
How to convert lowercase letters to uppercase and uppercase letters to lowercase in a string. (ex, AbcdEfG should convert as aBCDeFg)
How do you bind variables in pl sql?
Difference between DBMS and RDBMS...CODD's rules
Can We write bulk collect statement in triggers?
What is a sql profiler?
select sal from emp group by sal
which command using query analyzer will give you the version of sql server and operating system? : Sql dba
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)