How to copy one row of the table in the same table?

  • stackoverflow.com/questions/11331573/… ... the first answer is to help you - Anton Kucenko
  • @AntonKucenko but you need to change the values ​​in one column. - Vladislav Samokhin
  • one
    @ VladislavSamokhin This was not written in the source text of the question. For the future, I recommend to formulate the question more clearly. - AK

1 answer 1

You need insert-select , for example:

insert into t1(a, b, c) select aa as a, bb as b, 123 as c from t2 

The fields are copied from aa to a , bb to b , and just the number 123 in the c field.

  • It seems to me that aliases are not needed here, the fields are inserted not by their names but in order. - Ipatiev