I need to change table name from lowercase to uppercase but using this statement the table name can be changed but the names are in lowercase..
sql> rename table name to Name;
is there any way to convert table name to uppercase?
Capitalization. Use sentence-style capitalization for the table title and each column heading. Use sentence-style capitalization for the text in cells unless there's a reason not to (for example, keywords that must be lowercase).
For table names, you may use PascalCasing ( camelCasing with the first letter also capitalized) or lowercasing conventions, as long as you are consistent. In either case, table names should only contain alphabetic characters (no "_" or "-").
Add this line in the mysql server variables array in my.cnf:
lower_case_table_names=2
Restart your mysql server.
Now you can create or alter tables in upper case, the server will accept your query.
Note that usually, on Linux systems, the main mysql configuration file can be found in /etc/my.cnf
or /etc/mysql/my.cnf
.
This should give u what you are looking for...
ALTER TABLE oldtable RENAME TO NewTable;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With