在两张表之间使用UPDATE语句


1.

  update   id   set   A=(select   A   from   id,ida   where   id.id=ida.id),B=(select   B   from   id,ida   where   id.id=ida.id),C=(select   C   from   id,ida   where   id.id=ida.id)

 

2. 

  update   id   set   (a,b,c)=(select   a,b,c   from   ida   where   ida.id=id.id);

 

3.

  update   a   set   a.a   =   b.a   ,   a.b   =   b.b   ,   a.c=b.c   from   id   a   ,   ida   b   where   a.id   =   b.id


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM