Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
fetching with SELECT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: fetching with SELECT
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Need Help - Varying List Select SQL q... NikhilGuptaGaya DB2 0 Mon Jun 25, 2018 9:04 pm
No new posts How to force a select query to abend neo4u DB2 7 Mon Apr 23, 2018 1:36 pm
No new posts SELECT TO MULIPLE OUTFIL speermb DFSORT/ICETOOL 5 Fri Mar 23, 2018 10:44 pm
No new posts How to select record x+7 or x+2 based... JoAnn Kulcyk SYNCSORT 6 Tue Jan 16, 2018 10:49 pm
No new posts Fetching data from JHS as per the cur... arunsoods All Other Mainframe Topics 4 Wed Nov 22, 2017 1:54 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us