aspose file tools*
The moose likes JDBC and the fly likes What is  In clause Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "What is  In clause" Watch "What is  In clause" New topic
Author

What is In clause

Ranga Reddy shreya
Ranch Hand

Joined: Oct 20, 2004
Posts: 30
What is In clause in sql
difference between exist cluase and IN clause


Enjoy life .
Richard Green
Ranch Hand

Joined: Aug 25, 2005
Posts: 536
Get the list of students that have secured good grades
SELECT s.name from student s WHERE s.grade IN ('A','B','C')

Get the list of students that have secured good grades and are not in the badstudents list
SELECT s.name from student s WHERE NOT EXISTS ( SELECT 1 FROM badstudents b where b.studentid = s.studentid) AND s.grade IN ('A','B','C')


MCSD, SCJP, SCWCD, SCBCD, SCJD (in progress - URLybird 1.2.1)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What is In clause