Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

update with join

update A
  set A.first_name = B.first_name,A.last_name = B.last_name
   from dbo.tblA as A inner join dbo.tblB as B
on A.emp_id = B.emp_id

----

UPDATE A
SET A.<column_name> = B.<column_name>, ...
FROM <table_name> A
[ INNER | LEFT ] JOIN <table_name1> B ON <join_predicate>
[ WHERE Condition(s) ]
Source by www.c-sharpcorner.com #
 
PREVIOUS NEXT
Tagged: #update #join
ADD COMMENT
Topic
Name
1+6 =