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 Fetching data from JHS as per the cur... arunsoods All Other Mainframe Topics 4 Wed Nov 22, 2017 1:54 pm
No new posts Can we limit length in concatenation ... balaji81_k DB2 7 Tue Aug 22, 2017 2:50 am
No new posts Select numeric portion from CHAR data... balaji81_k DB2 6 Sat Aug 19, 2017 1:51 am
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts SQL - select data available in index Nileshkul DB2 3 Mon Jun 26, 2017 1:30 am

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