IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Simple SELECT or CURSOR


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
AnuB
Currently Banned

New User


Joined: 29 Aug 2005
Posts: 33

PostPosted: Tue Sep 13, 2005 7:28 pm
Reply with quote

?How can one determine before performing a task that either a cursor is required or simple select statement ?
Back to top
View user's profile Send private message
baru

New User


Joined: 08 Sep 2005
Posts: 4
Location: Mumbai

PostPosted: Tue Sep 13, 2005 9:06 pm
Reply with quote

It depends upon your requirement. If the SQL Query retrieves only one row you can use simple select and for multiple rows you can use cursor.
Back to top
View user's profile Send private message
withnams

New User


Joined: 06 Jul 2005
Posts: 26
Location: Chennai

PostPosted: Thu Sep 15, 2005 1:57 pm
Reply with quote

If the WHERE clause refers to a column that is unique you can avoid cursor. But as baru said it all depends on your requirement.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Dynamically pass table name to a sele... DB2 2
No new posts SELECT from data change table DB2 5
No new posts Select two different counts from SQL... DB2 6
No new posts Run a simple JOB as Started Task All Other Mainframe Topics 4
No new posts Select a DB2 value in a specific deci... DB2 4
Search our Forums:

Back to Top