Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

UPSERT means INSERT and\or UPDATE, is there a standard name for a sproc that will INSERT if necessary and then SELECT?

e.g. I want to get the IS of a row that matches fields and give me the ID, if nothing matched then I want it to INSERT a new row and return me the ID of that row.

share|improve this question
    
Similar question has been answered here. stackoverflow.com/questions/3593870/… –  davisdba Apr 3 at 14:35
    
@BinayaRegmi, that question seems to be about implementation (which is useful as well), I just wondered if thare was a naming convention for it... Merge maybe? –  BanksySan Apr 3 at 14:49
    
MERGE is the actual SQL statement that performs the "upsert" function. I don't think there is a name for what you are describing. May be call it "inselect"? –  mustaccio Apr 3 at 15:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.