How to check whether record is already exist or not in database?

When we are working with database we need to check respective record is present or not in database. If it is available we will update the record and if it is not available we will insert the record.


The above store procedure working on two conditions. If it is found that record is available it will display the message “this record already exist” and if it won’t find the it will insert the record with record added message.