Welcome to WebmasterServe!

FREE TO JOIN! Join us now to engage in informative and friendly discussions about Webmastering, SEO, SEM, Internet Marketing, Programming, Graphic Design, Online Jobs and more. What are you waiting for? Ready to join our friendly community? It takes just one minute to register.

Dismiss Notice

Join WebmasterServe Forums 
Join the discussion! Have a better idea or an opinion? It takes just one minute to register Click Here to Join

My 2 Cents List Operator

Discussion in 'Database Management' started by Swati Mishra, Mar 17, 2016.

  1. Swati Mishra

    Yellow Belt

    Joined:
    Dec 28, 2015
    Messages:
    644
    Ratings:
    +105 / -0
    IN and NOT in comes in the list operators. The IN operator that allows the selection of values that match any one of the values in the list. Same way the NOT IN operator restricts the selection of values that match any one values in the list.
    Syntax

    SELECT column_list
    FROM table_name
    WHERE expression list_operators (‘value_list’)
     
  2. Manish Mishra

    Yellow Belt

    Joined:
    Dec 22, 2015
    Messages:
    1,025
    Ratings:
    +159 / -0
    The list operator will search for the data you have queried to retrieve by using IN and NOT operator. This can either includes set of data you want or it excludes what should not be retrieved as the data queried by you from the database.
     
  3. Swati Mishra

    Yellow Belt

    Joined:
    Dec 28, 2015
    Messages:
    644
    Ratings:
    +105 / -0
    if you have to select some data by using IN operator then use like that
    example

    SELECT student_name, roll_no
    FROM student
    WHERE class IN ('1', '2')

    above example will display the student name and roll no who read in class 1 or class 2
     

Share This Page