数据库不支持update from子语句的解决方案

来源:互联网 发布:ubuntu编译c 程序 编辑:程序博客网 时间:2024/06/06 05:59
SQLserver的写法:
update log set uin= b.uin from log a,logs b where a.accountuin =  b.accountuin
 
 
 
mysql的写法
 
update biao_1 a join biao_2 b on a.a1=b.b1set a.a2=b.b2

 

UPDATE b,a SET b.public=a.publicWHERE b.id=a.id


 

VF6.0

(设置关系法,仅限于一对一关系)

 select 0
 use parent

 index on id tag id
 set order to id

 select 0
 use child

 index on id tag id
 set order to id
 
 set relation to id into parent 
 update child set child.name=parent.name where child.id=parent.id

 

原创粉丝点击