Python pymysql data migration

scenario:

ACABC

current scheme:

100sql

example:

sql:
select t.* from (select id, name, age, (select id from tb_stu_class stu_id = id) as class_id from tb_student limit 0, 100) t

sql:
insert into tb_student(id, name, age, class_id) values (), (), ()...

question 1:

    

question 2:

    pymysql.fetchall(),

question 2:

    
Nov.25,2021

if there is no complex logic or strict time requirements, just write to the new table with select into .

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3c6ff-2c308.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3c6ff-2c308.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?