Oracle sql return true if exists question

后端 未结 5 1270
清酒与你
清酒与你 2021-01-03 21:12

How do I check if a particular element exists in a table - how can I return true or false?

I have a table that has

  • user_id
  • user_password
5条回答
  •  清酒与你
    2021-01-03 21:30

    select count(*) from table where userid = :userid and rownum <= 1); -- If exists then 1 else 0

提交回复
热议问题