问题一: insert into databaseB select * from databaseA;
问题二:databaseC是库吗??databaseA,databaseB是表?? 那么就 执行 create table databaseC.t1 as select * from databaseA; create table databaseC.t2 as select * from databaseB;
第三个问题没看懂,就是不能让databaseA和databaseB数据重复吗
-------两个表合并??合并到一个新表吗??
下载个 Navicat
可以参考一下语句进行改写:
INSERT into db_ds_edu.t_exam_student(stu_id,stu_number,stu_name,school_id,campus_id,grade_id,class_id,xuebu_id)
SELECT stu.id
, stu.student_num
,person.name
, stu.school_id
, stu.campus_id
, stu.grade_id
, stu.clas_id
, stu.xuebu_id
FROM
db_ds.t_stu_info AS stu
,db_ds.t_p_person_info as person
WHERE stu.person_id = person.id