Answers for "sql insert if exists else update"

SQL
1

sql server if exists update else insert

if exists(SELECT * from Student where FirstName='Akhil' and LastName='Mittal')            
BEGIN            
 update Student set FirstName='Anu' where FirstName='Akhil'  
End                    
else            
begin  
insert into Student values(1,'Akhil','Mittal',28,'Male',2006,'Noida','Tenth','LFS','Delhi')  
end 
Posted by: Guest on June-03-2020

Code answers related to "sql insert if exists else update"

Code answers related to "SQL"

Browse Popular Code Answers by Language