Get the App
SLTechnology News&Howtos  ›  Database  › 

Sql table replication, data insertion, field migration

Shulou Source: shulou.com Published: 2022-06-01 04:39:19 10月04日 Update

Migrate the field RegTime value to RegTime2: update commodity set RegTime2 = RegTimeTable commodities2 is pre-created, insert all the data in table commoditiesinto table commodities2: insert into commodities2 select * from commoditiesMigrate some fields in table commoditiesinto table commodities2: delete from commodities2; insert into commodity2 (commodityID,commodityName) select commodityID,commodityName from commoditySELECT INTO FROM statement, currently not supported in mysql, for example: select * into commodity3 from commodity1 So you can use the following method to create + data table migration in unsupported databases such as mysql: create table commodity5 as select * from commodity 2 create table commodity5 (select * from commodity2)

Tags: Data Migration Field support Database method statement part face build Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Shulou Information OPPO Reno MySQL Apple