Update tbtype
Set tbtype. adtypename = B. adtypename, tbtype. width = B. Width, tbtype. Height = B. Height, tbtype. admodeid = B. admodeid
From system. DBO. tbtype B
Where tbtype. adtypeid = B. adtypeid
I forgot this even today. Please forget it :)
======================================
Synchronize data from two tables
Update ctarticle a inner join cttag B on A. ArticleID = B. ArticleID Set B. classid = A. classid, B. nclassid = A. nclassid;
Update Table 1 alias A join Table 2 alias 2 in alias. column 1 equals to alias B. column 1 sets the alias B. column 2 is updated to alias. column 2, alias B. column 3 is updated to alias. column 3
Add data to a connection table
Insert into cttag (TAG, ArticleID) Select top 1 B. tag,. articleID from ctarticle as a left join cttag as B on. articleID = B. articleID where. articleID order by. articleID DESC;