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

fetching with SELECT


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

New User


Joined: 16 Dec 2004
Posts: 44
Location: Hyderabad

PostPosted: Fri Jan 20, 2006 2:18 am
Reply with quote

I have 10 columes in a table.

SELECT 1 FROM EMP WHERE EMPNO = '5012'

Does the above statement yield the result or abend?
Back to top
View user's profile Send private message
Lkmi

New User


Joined: 04 Mar 2005
Posts: 53
Location: Newyork

PostPosted: Fri Jan 20, 2006 3:20 am
Reply with quote

it neither yields u the result nor abends
Back to top
View user's profile Send private message
Lkmi

New User


Joined: 04 Mar 2005
Posts: 53
Location: Newyork

PostPosted: Fri Jan 20, 2006 3:24 am
Reply with quote

all it does is...


say, if u have 25 rows available in the EMP table where EMPNO = '5012'

then, on executing the query, 25 rows with value as 1(without any column name will be displayed...

something like this

SELECT 1 FROM table 1
WHERE country = 'ASIA'

would result in


---------+---------+---------+---------+-

---------+---------+---------+---------+-
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1 ....
25 rows.
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 Select a DB2 value in a specific deci... DB2 4
No new posts How can I select certain file dependi... JCL & VSAM 12
Search our Forums:

Back to Top