[原创] firebird 的 一个表更新到另外一个表

firebird 的 一个表更新到另外一个表

 

使用存储过程

 

for select * from table1 into :f1,:f2,:f3 do

 

begin

 

  update table2 set ff2 = :f2 ,ff3 = :f3 where  ff1 = :f1

 

end

 

等价于  mssql 

 

update table2 set ff2 = table1.f2 ,ff3 = table1.f3 from table1 where ff1=table1.f1

 

上面那个是否风格更加容易懂呢?

 

版本支持 :firebird 1.5 就支持 

posted @ 2010-05-25 11:51  苹果X1  阅读(265)  评论(0编辑  收藏  举报