A表(tid pk,tcontent),B表(tid pk,tcontent),将B表中的tcontent复制到A表中的tcontent中,A表的tid与B表的tid一样。语句应该如何实现呢?
解决方案 »
- 问个mysql备份的问题
- you have an error in your sql syntax; check the manual that corresponds to your mysql server version
- 求个SQL~~~~
- mysql cursor中异常处理
- 平时不能上网络啊,周末不知道有没有高手在啊。现在想实现,将字段value内容全部是空格的数据检索出来.
- 创建约束后,插入数据失败?
- 复合索引的问题,建立复合索引对字段数有什么限制吗?
- 关于Postgres的文件打开过多的问题,高手指教
- 【请问】如何使用mysql c api 附加数据库
- MYSQL是文件型的吗?
- mysql front 不能连接到 mysql 是怎么回事呢?
- 请大家帮忙看看,使用mysql connector/c++ 往数据库中插入blob字段出1210错
set b.tcontent=a.tcontent
set a.tcontent=b.tcontent
insert into A
select * from b
ON DUPLICATE KEY UPDATE
tcontent=values(tcontent)
or
update a,b set a.tcontent=b.tcontent where b.tid=a.tid
set A.tcontent=b.tcontent
where A.tid=B.tid