T
T
tani_svet242015-10-17 22:32:16
MySQL
tani_svet24, 2015-10-17 22:32:16

Loop in MySQL - how to make a copy with a change of one cell for each selected row?

Good afternoon!
Tell me how to make it so that by selecting rows, then copying them, replacing each of them with a certain value?
and then I got tired of unloading and replacing in a notepad :)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Ruslan Fedoseev, 2015-10-17
@tani_svet24

insert into table (select id,p1,p2,p3,35,p5 from table where ...)
well, very rude, but something like this - 35 will be written instead of p4

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question