What is the meaning of <> in mysql query?

前端 未结 6 1415
醉酒成梦
醉酒成梦 2020-12-28 12:13

I have a MySQL query that includes <> in it. I don\'t know the exact usage of it.

SELECT * FROM table_laef WHERE id = ? AND genre_type <> \'LIVE\'
<         


        
6条回答
  •  [愿得一人]
    2020-12-28 12:42

    <> means NOT EQUAL TO, != also means NOT EQUAL TO. It's just another syntactic sugar. both <> and != are same.

    The below two examples are doing the same thing. Query publisher table to bring results which are NOT EQUAL TO <> != USA.

    SELECT pub_name,country,pub_city,estd FROM publisher WHERE country <> "USA";

    SELECT pub_name,country,pub_city,estd FROM publisher WHERE country != "USA";

提交回复
热议问题