oracle数据库中在同一数据库里
表A(student_no,name,teacher,sex,a1,a2,a3,a4),
表B(no,name,b1,b2,sex,age,grade) 把表A中的数据导入到表B中,表B里没有数据.
其中A.student_no的数据导入到B.no中,
a1中的数据导入到b1中,
a2中的数据导入到b2中,a2类型是number(22,0),b2类型是varchar(50,byte)
其他的字段相同的导入
怎么利用SQL语句实现数据的插入...
表A(student_no,name,teacher,sex,a1,a2,a3,a4),
表B(no,name,b1,b2,sex,age,grade) 把表A中的数据导入到表B中,表B里没有数据.
其中A.student_no的数据导入到B.no中,
a1中的数据导入到b1中,
a2中的数据导入到b2中,a2类型是number(22,0),b2类型是varchar(50,byte)
其他的字段相同的导入
怎么利用SQL语句实现数据的插入...
insert into b(no,name,b1,b2,sex,age,grade)
select student_no,name,a1,b1,sex,a3,a4 from a;
insert into b
select student_no,name,a1,a2,sex,a3,a4 from a;
insert into ...select....直接这样会违反"唯一约束条件的",我是新手不知道应该怎么做了?