Menu

Let's Us Share What We Know

  • HOME
  • BLOG
  • Script to change case of mysql tables

Script to change case of mysql tables

1,July,2011

Here is  an SQL script that renames all tables in a mysql schema schema to its lower case form.

select concat('rename table ', table_name, ' to  temp' , ';','rename table temp to  ',  lower(table_name), ';' ) from information_schema.tables where table_schema = 'your-schema';
The above script generates SQL statements (which you can copy-paste) that will help you to change case of table names to lower.

Leave a Reply

Your email address will not be published. Required fields are marked *