Alternative to except in MySQL

前端 未结 3 1799
谎友^
谎友^ 2021-02-07 04:53

I must write a Query like this in MySQL:

SELECT * 
FROM Tab1
EXCEPT
SELECT * 
FROM Tab1 
WHERE int_attribute_of_Tab1>0

but MySQL doesn\'t su

3条回答
  •  深忆病人
    2021-02-07 05:21

    Try this

    SELECT * 
    FROM Tab1
    WHERE [....] NOT EXISTS 
    (SELECT * 
    FROM Tab1 
    WHERE int_attribute_of_Tab1>0) 
    

提交回复
热议问题