Posted By

geekzspot on 10/30/12


Tagged


Versions (?)

Oracle If Exists


 / Published in: SQL
 

Test for existence of at least 1 matching row, without having to count them all

  1. SELECT count(*) FROM TABLE WHERE COLUMN = :value AND rownum <= 1; -- If exists then 1 else 0

Report this snippet  

You need to login to post a comment.