Last active
February 15, 2018 19:56
-
-
Save DmitriyRF/5493cf7e00ba8bc60392493776f23ccf to your computer and use it in GitHub Desktop.
Поиск столюцов по БД
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| UPDATE [Таблица] SET [Поле]=REPLACE([Поле],'Строка_1','Строка_2'); | |
| //Or full changing | |
| UPDATE `Darabase`.`wp_options` SET `option_value` = 'http://local.com' WHERE `wp_options`.`option_id` = 1; | |
| UPDATE `DataBase`.`Table` SET `Table-column_1` = 'String_1' WHERE `Table`.`Table-column_2` = Value; | |
| UPDATE wp_options | |
| SET option_value = REPLACE(option_value, 'site.ca', 'local.site.ca') | |
| WHERE option_value LIKE '%site.ca%' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT column_name | |
| FROM INFORMATION_SCHEMA.COLUMNS | |
| WHERE TABLE_NAME IN ( | |
| SELECT DISTINCT TABLE_NAME | |
| FROM INFORMATION_SCHEMA.TABLES | |
| WHERE table_schema = 'название базы' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment