2

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;

asked Nov 20, 2015 at 19:59
1
  • Go ahead. It's the answer I was looking for. I'll check it in, if you do. Thanks. Commented Nov 20, 2015 at 21:01

1 Answer 1

2

Have you looked at

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

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

answered Nov 20, 2015 at 21:02

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.