Share
Showing posts with label IN. Show all posts
Showing posts with label IN. Show all posts

  • If you want to find a specific information from different sources/places from database then you can use the statement IN like this-
    SELECT name, state FROM customers WHERE state IN('CA','NY','NC')
  • If you want to find a specific information form different sources accept a few sources the then use statement NOT IN like this-
    SELECT name, state FROM customers WHERE state NOT IN('CA','NY','NC')
  • For the same conditions as mentioned above if you want to order your result according to a specific manner then use ORDER BY statement like this-
    SELECT name, state FROM customers WHERE state IN('CA','NY','NC') ORDER BY state