![](/img/trans.png)
[英]PostgreSQL: How to copy data from one database table to another database
[英]Creating a trigger to copy data from one column to another in the same table - PostgreSQL
我对弄清楚如何将同一行中的数据从旧列复制到新列感兴趣。 这将在触发过程中单独完成,而不是像UPDATE table SET columnB = columnA
。
为了澄清一下,如果对table1.column1.row3
执行了INSERT或UPDATE语句,请使用table1.column1.row3 -> table1.column2.row3
table1.column1.row3
。
分配触发器
NEW.column1 := NEW.column2
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.