[英]Copy data from one table to another when column sizes are different
I have two tables t1 (old) with 4 columns and t2 (new table) with 6 columns. 我有两个具有4列的表t1(旧)和具有6列的t2(新表)。
I want to copy the data from t1
to t2
with date and 'ÝES' as default values in T2 as these values are not available in T1. 我想将数据从
t1
复制到t2
并将日期和“ ES”作为T2中的默认值,因为这些值在T1中不可用。
Please help me with this. 请帮我解决一下这个。
这应该得到期望的结果:
insert into T2 (c1,c2,c3,c4,c5,c6) select c1,c2,c3,c4,sysdate, 'ÝES' from T1;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.