1

I was editing a SQL script that I was using in MySQL Workbench 6.3. To my surprise, I noticed that one section of the code had transformed into all uppercase. I normally type in mostly lowercase with my own habits for tabs and capitalization. Somehow, a section of the code was automatically reformatted.

I am not familiar with what option caused this. Perhaps I made some sort of error in keyboarding while flipping and scrolling through a lot of code. Is there an autoformatting feature in MySQL Workbench?

How can this type of formatting be done or undone?

A sample of my code before and after follows:

Before:

select * from ReportQA_TEMPA; select * from ReportQA_TEMPB; select * from ReportQA_TEMPC; select * from ReportQA_TEMPD;

After:

SELECT * FROM ReportQA_TEMPA; SELECT * FROM ReportQA_TEMPB; SELECT * FROM ReportQA_TEMPC; SELECT * FROM ReportQA_TEMPD;

  • Go ahead. It's the answer I was looking for. I'll check it in, if you do. Thanks. – gladiola Nov 20 '15 at 21:01
1

Have you looked at

Edit -> Preferences -> SQL Editor -> Query Editor? 

There are a couple of "beautifier" and "capitalise" options there.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.