Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What is ALL and ANY operator in SQL?
02-14-2013, 05:46 AM
Post: #1
What is ALL and ANY operator in SQL?
Quote:The operators ANY and ALL are always used in combination with one of the comparison operators.
The general syntax of both operators is

column operator [ANY | ALL] query

Quote:The ANY operator evaluates to true if the result of an inner query contains at least one row that satisfies the comparison.

Quote:If we want to list the part number, part description, unit price, and item class for each part that has a unit price greater than the unit price of every part in item class AP. Use either the ALL or ANY operator in your query.
SELECT Part.PartNum, Part.Description, Part.Price, Part.Class
WHERE [Price]> ANY
(Select Price from Part Where

View Asad Ali's profile on LinkedIn


User(s) browsing this thread: 1 Guest(s)