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

Can a table contain multiple primary key’s?

0 Answers  


What is the difference between microsoft sql and mysql?

0 Answers  


How many LONG columns are allowed in a table?

6 Answers   CTS,


Which clause of an UPDATE statement allows you to affect only certain rows of a table? 1. The WHERE clause 2. The SET clause 3. The ROWS AFFECTED clause 4. The ORDER BY clause

6 Answers   HCL,


what is the different between now() and current_date()? : Sql dba

0 Answers  






How do you declare a user-defined exception?

0 Answers  


What are the most important ddl statements in sql?

0 Answers  


What is denormalization in a database?

0 Answers  


how to create a new table by selecting rows from another table in mysql? : Sql dba

0 Answers  


What does the sign mean in sql?

0 Answers  


How can we link a sql database to an existing android app?

0 Answers  


Where the sql database files are stored?

0 Answers  


Categories