Join TalkersCode Now !

Get Latest Tutorials And Links On Web Development
And Get Existing Offers Via Email

MySQL Operators

MySQL Operators

MySQL has different kinds of operator for different kind of purposes.Operators are very helpful they can make querying a database very easy.



  • " = " Operator it is equal to operator
  • WHERE student_name = 'Rahul'

  • " < " Operator it is less than operator
  • WHERE student_id < '2'

  • " > " Operator it is greater than operator
  • WHERE student_id > '5'

  • " <= " Operator it is less than or equal to operator
  • WHERE student_id <= '3'

  • " >= " Operator it is greater than or equal to operator
  • WHERE student_id >= '3'

  • " != " Operator it is Not equal to operator
  • WHERE student_id != '3'

  • " AND " Operator
  • WHERE student_id = '3' AND student_name = 'Rahul'

  • " OR " Operator
  • WHERE student_id = '3' OR student_id = '5'

  • " NOT " Operator
  • WHERE NOT student_id = '3'

  • " IN " Operator it is used to compare and find that the value is in list of expressions.In the bracket we use expressions
  • WHERE student_id IN (1,2,3)

  • " BETWEEN " Operator
  • WHERE student_id BETWEEN '3' AND '5'

  • " LIKE " Operator you can use % and - with LIKE operator
  • /* It displays all the results where student_name is starting 
    from Rah*/
    
    WHERE student_name LIKE 'Rah%'
    
    or 
    
    /* It displays all the results where student_name is ending 
    from hul*/
    
    WHERE student_name LIKE '%hul'
    
    
PrevNext

Join Us With Our 21000+ Subscribers And Get Our Latest Tutorials Update Via Email

Are You Starting A New Blog
Do You Want Best Web Hosting?

Try World's Best Web Hosting Provider BlueHost
At Just $3.95/mo

Hurry Up! Limited Time Offer

Yes, I Want To Check Out BlueHost

Check The World's Best SEO And All-In-One Marketing Toolkit
For Digital Marketing Professionals SEMRUSH

Check Out SEMRUSH