mysql 的一些有意思的sql记录,持续更新...

insert into db.tableA (feild1,feild2) select value1,value2 from db.tableB where id=1;

2018-10-10

这是在一个同事写的存储过程中看见的,第一次见这种写法,挺有意思的,把原代码贴上:

将db.tableB 中查询到的数据插入到db.tableA中的feild1,feild2字段中

猜你喜欢

转载自blog.csdn.net/qq_38802291/article/details/83000355