asad_hussain
asad_hussain

Reputation: 2001

Meaning of < > symbol in a mysql query

I came across a mysql query which is

SELECT P.pid FROM Parts P WHERE P.color<> 'blue'

I dont understand the meaning of <> symbol in the query.I have never seen such a symbol in mysql.

And the query in which this subquery is embedded is

SELECT S.sname
    FROM Suppliers S
        WHERE S.sid NOT IN (SELECT C.sid
                            FROM Catalog C
                            WHERE C.pid NOT IN (SELECT P.pid  
                                                FROM Parts P
                                                WHERE P.color<> 'blue'))

And the tables are as follows --

Suppliers(sid:integer, sname:string, city:string, street:string)
Parts(pid:integer, pname:string, color:string)
Catalog(sid:integer, pid:integer, cost:real)

Can someone explain the use of this symbol ?

Upvotes: 1

Views: 1374

Answers (2)

tanaydin
tanaydin

Reputation: 5316

It is 'not equal' some SQL versions it is '!=' instead of '<>'.

Upvotes: 2

SamB
SamB

Reputation: 1710

It is the not equal operator. It is same as !=

Upvotes: 5

Related Questions