0 votes 0 votes i got a doubt in understanding the sql concepts that "What does 'not exist' do in a sql query and does it work can anyone plz expain me with an example..??? plz iita asked Dec 26, 2016 iita 643 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes NOT EXISTS works like EXISTS, except the WHERE clause in which it is used is satisfied if no rows are returned by the subquery. For Ex. SELECT Name FROM Product WHERE NOT EXISTS (SELECT * FROM ProductProductSubcategory WHERE ProductSubcategoryID = Product.ProductSubcategoryID AND Name = 'Wheels') The outer query will print the Name only for which inner Query returns 0 rows. Jason GATE answered Dec 31, 2016 Jason GATE comment Share Follow See all 0 reply Please log in or register to add a comment.