Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
CREATE PROCEDURE usp_INSERTUPDATEEMP ( @EmpID AS INT, @LastName AS NVARCHAR(20), @FirstName AS NVARCHAR(20) ) AS BEGIN IF EXISTS (SELECT EmployeeID FROM Employees WHERE EmployeeID = @EmpID) BEGIN -- Write your update query UPDATE Employees SET FirstName = @FirstName, LastName = @LastName WHERE EmployeeID = @EmpID END ELSE BEGIN -- Write your insert query INSERT INTO Employees (EmployeeID, FirstName, LastName) VALUES ( @EmpID, @FirstName, @LastName ) END END
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.