SQL select from data in query where this data is not already in the database?

前端 未结 5 1088
日久生厌
日久生厌 2021-01-20 22:00

I want to check my database for records that I already have recorded before making a web service call.

Here is what I imagine the query to look like, I just can\'t

5条回答
  •  北恋
    北恋 (楼主)
    2021-01-20 22:33

    How about a nested query? This may work. If not, it may get you in the right direction.

    SELECT * FROM table WHERE id NOT IN (
            SELECT id FROM table WHERE 1
    );
    

提交回复
热议问题