daily pastebin goal
50%
SHARE
TWEET

Untitled

a guest Aug 20th, 2018 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT EXISTS (SELECT 1 FROM MyTable WHERE FirstName = @FirstName AND LastName = @LastName AND Address = @Address)
  2. BEGIN
  3.  SET @IsNewRecord = 1
  4. END
  5.  
  6. IF @IsNewRecord = 1
  7. BEGIN
  8.  INSERT MyTable
  9.  VALUES (@FirtName, @LastName, @Addres, @City, @Phone)
  10. END
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top