Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 Two Selects in a single select query Rohit Umarjikar DB2 1 Fri Nov 04, 2016 8:46 pm
No new posts Can we use OPTIMIZE FOR 1 ROWS for fe... cvijay784 DB2 1 Fri Aug 05, 2016 11:56 am
No new posts Select first 2 group data vice_versa DFSORT/ICETOOL 10 Mon Jun 13, 2016 2:21 pm
No new posts Query to select Null row on priority RahulG31 DB2 24 Thu Jan 21, 2016 5:45 pm
No new posts Can I use sort to select sample recor... Steve Ironmonger DFSORT/ICETOOL 3 Tue Nov 10, 2015 10:02 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us