Click here to Skip to main content
15,885,896 members
Articles / Programming Languages / SQL

Combining Insert/Update to one Procedure

Rate me:
Please Sign up or sign in to vote.
4.86/5 (7 votes)
8 Apr 2011CPOL 25.5K   6  
DescriptionC...

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

Please Sign up or sign in to vote.
14 Jul 2010Mycroft Holmes 3 alternatives  
Why do developers insist on separate procedures to do these jobs
Please Sign up or sign in to vote.
4 Apr 2011A.J.Wegierski
For Oracle: -------------------------------------------------------------------------------- -- DESCRIPTION -- Universal save -- PARAMETERS IN -- vTRYB: mode: (I)nsert/(D)elete/(U)pdate -- rc: record -- PROCEDURE zapiszObiekt(vTRYB IN...
Please Sign up or sign in to vote.
3 Jan 2012Dnyanesh Wahiley
CREATE PROCEDURE sp_Insert ( @ID int, @Name char(20), @Mode char(20) ) ASif @Mode='Insert in Employee'Begin insert into Employee(Employee_ID,Employee_Name)values(@ID,@Name)Endelse if @Mode='Insert in Student'Begin insert into...

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Team Leader
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions