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

What will be output of SQL query


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

New User


Joined: 18 Apr 2006
Posts: 2
Location: gurgaon

PostPosted: Wed May 24, 2006 1:46 am
Reply with quote



Select sum(salary) from emp

what will be the output if table is empty.?
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Wed May 24, 2006 1:57 am
Reply with quote

Since there are no rows, the value of the sum of nulls is null.

The select will return a NULL.

Dave
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 TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts RC query -Time column CA Products 3
No new posts Joinkeys - 5 output files DFSORT/ICETOOL 7
No new posts Dynamically pass table name to a sele... DB2 2
Search our Forums:

Back to Top