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

What is the meaning of NOT in sql Query


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

New User


Joined: 29 May 2006
Posts: 0

PostPosted: Wed Aug 30, 2006 12:22 pm
Reply with quote

Select * from <<Table Name>> where << condition1>> and not <<Condition2>>

what is the meaning of not <<condition2>>
Back to top
View user's profile Send private message
SBMF390

New User


Joined: 27 Jul 2006
Posts: 9

PostPosted: Wed Aug 30, 2006 4:17 pm
Reply with quote

Hi,

Select * from TAble1 Where ay = '12' and Not = '67'

Hope u can get it.
Back to top
View user's profile Send private message
muthuvel

Active User


Joined: 29 Nov 2005
Posts: 217
Location: Canada

PostPosted: Wed Aug 30, 2006 4:43 pm
Reply with quote

Hi,

Use the NOT keyword to select all rows except the rows identified with the search condition

The NOT keyword must precede the search condition

Example-
SELECT EMP_NO, EMP_NAME, DT_JOIN
FROM EMP
WHERE NOT WORKDEPT = ?OS'

In this case the rows which do not have Work Department as 'OS' will be retrieved.

Thanks,
Muthuvel.
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 RC query -Time column CA Products 3
No new posts Dynamically pass table name to a sele... DB2 2
No new posts Query on edit primary command CLIST & REXX 5
No new posts Query on edit primary command CLIST & REXX 1
No new posts Issue with EXEC CICS QUERY SECURITY c... CICS 6
Search our Forums:

Back to Top