IPT home IPT A Virtual Approach by Peter Whitehouse
Quick Links:
 
 
SQL home
Information and Intelligent Systems Social and Ethical Implications Human Computer Interaction Software and Systems Engineering eXercise Files Course Outline and Assessment A-Z of Geeky Acronyms Terrace Work Program 2004 Sillybus FAQ = Frequently Asked Questions Help
 
 

MySQL Operators

Mathematical and Logical Operators available in MySQL

:: Intro :: Datatypes :: DDL :: DML :: Operators :: Built-ins ::

All the following operators are used as part of expressions (typically in a WHERE clause)

        Operator        DESCRIPTION
      
        +               addition
        -               subtraction
        /               division
        *               multiplication


        =               equal/identical to
        !=              not equal to
        <>              not equal to
        >               greater/later than
        >=              greater or equal to
        <               less/earlier than
        <=              less or equal


        AND             conjunction
        OR              disjunction
        NOT             negation
        EXISTS          at least one value present


        IS NULL         has null value (use NULL)
        BETWEEN..AND..  start..finish boundary conditions
        LIKE            pattern matching using '%' or '_' wildcards
        PART            find letters in a string (eg. ARTIST PART 'QZ' 
                         meaning the artist column contains a 'Q' or a 'Z')

        ()              represents a solution set (eg. a select or a list)
        IN ()           is a member of
        NOT IN ()       isn't a member of


        ANY()           means some member
        = ANY ()        equals some member [use IN()]
        ^= ANY ()       not equal to some member
        > ANY ()        greater/later than some member
        >= ANY ()       greater or equal to some member
        < ANY ()        less/earlier than some member
        <= ANY ()       less or equal to some member


        ALL()           means every member
        = ALL ()        equals every member
        ^= ALL ()       not equal to every member [use NOT IN()]
        > ALL ()        greater/later than every member
        >= ALL ()       greater or equal to every member
        < ALL ()        less/earlier than every member
        <= ALL ()       less or equal to every member

A full list of built-ins can be seen in the MySQL manual

:: Intro :: Datatypes :: DDL :: DML :: Operators :: Built-ins ::

 

wonko@wonko.info
©Copyright t 1992..2018+. Edition 26.150117
wonkosite
Creative Commons License
This work is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 2.1 Australia License
.