数据库中有两个表:cy和temp
结构:cy
xsbh,姓名,名次
001 aa
002 bb
003 cc
结构:temp
xsbh 名次
003 1
002 2
001 3
adoquery4.Close;
adoquery4.SQL.Clear;
adoquery4.SQL.Add('insert into cy (名次) Select 名次 from temp where cy.xsbh = temp.xsbh');
adoquery4.ExecSQL;
我的意图是将temp中的名次放到cy中
结构:cy
xsbh,姓名,名次
001 aa
002 bb
003 cc
结构:temp
xsbh 名次
003 1
002 2
001 3
adoquery4.Close;
adoquery4.SQL.Clear;
adoquery4.SQL.Add('insert into cy (名次) Select 名次 from temp where cy.xsbh = temp.xsbh');
adoquery4.ExecSQL;
我的意图是将temp中的名次放到cy中
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货