2
Answers

i want insert data in a qualification table.

PUNIT  RAI

PUNIT RAI

9y
464
1

Answers (2)
2
Himanshu Jaiswal

Himanshu Jaiswal

NA 204 10 7y
Hi Seshadri,
 
There are multiple way to pull the book those are not sold yet: 
 
1) SELECT B.Bookname FROM Book B LEFT JOIN sold S  on B.BID=S.BID where S.solddate IS NULL
 
2) SELECT B.Bookname FROM Book B  where B.BID NOT IN  (SELECT S.BID FROM sold  S)
 
 
0
Poonam Bhosale

Poonam Bhosale

NA 73 3 7y

Hi  Seshadri,

You will get a right answer by executing following query      
 
select b.Bookname
from Book b
where b.BID not in(select s.BID from Sold s where b.BID=s.BID ) 
0
Manas Mohapatra

Manas Mohapatra

NA 29.3k 3.3m 7y
You can try like this
  1. SELECT DISTINCT B.Bookname   
  2. FROM Book B INNER JOIN Sold S   
  3. ON B.BID != S.BID