Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

update join sql

MySQL:

update ud u
inner join sale s on
    u.id = s.udid
set u.assid = s.assid

----------------
SQL Server:

update u
set u.assid = s.assid
from ud u
    inner join sale s on
        u.id = s.udid
---------------
PostgreSQL:

update ud
  set assid = s.assid
from sale s 
where ud.id = s.udid;
Source by www.sqlservertutorial.net #
 
PREVIOUS NEXT
Tagged: #update #join #sql
ADD COMMENT
Topic
Name
4+7 =