SQL
Copy codeThe Code is as follows:
Insert into 'table' ('id', 'AA', 'bb ', 'cc') SELECT 'id', 'A', 'bb ', 'cc' FROM 'table' (WHERE .....)
Tips:
Copy codeThe Code is as follows:
/**
* When copying a new record, you may need to update the id or part of the data (assuming that the id is automatically increased)
*
* Text_aa is a fixed value. You can assign a variable value in a script call, for example, $ aa)
* Note the difference between 'text _ AA' and 'cc'. One is data and the other is field.
**/
Insert into 'table' ('id', 'AA', 'bb ', 'cc') select', 'aa content', 'bb pay attention to cc symbol Difference ', 'cc' FROM 'table' (WHERE .....)
/**
* CONCAT ('bb', 'additional information-copy ')
* Add additional information on the basis of extracting the original data (which is understandable when I have seen xxx. xxx in windwos)
**/
Insert into 'table' ('id', 'A', 'bb ', 'cc') select', 'aa content', CONCAT ('bb ', 'additional information-copy'), 'cc' FROM 'table' (WHERE .....)