V
V
vitaly_742020-05-29 12:10:05
MySQL
vitaly_74, 2020-05-29 12:10:05

Is it possible to automatically rename fields, tables in the database?

Good afternoon, there is some table cf_2233, I need to rename it to currencies, but the problem is that in the database this table is mentioned in other tables as a field name, i.e. left_table.cf_2233 and as the cell value itself in the table.
tell me how to make a mass replacement of cf_2233 with currencies.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Shumov, 2020-05-29
@inoise

No way. You will have to write a transaction with the removal of Foreign Keys and indexes, if any, and then create it all again after renaming the field

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question