What is the fastest way to check if a record exists in db which will be applicable to oracle , mysql and postgres.
As per this link : Fastest way to determine if record exists , we can use the top clause but top is not available in oracle . I dont want to have different queries for different dbs.
Hence , what would be the best generic query to check if record exists in db?
existsfrom you have to select from dual, which isn't generic. Many similar questions have been asked before though...