0

How can I output SQL in Terminal so that is readable even for very long rows?

I have SQL output that is very messy since each row is very long. This makes the table jumbled in my terminal.

I remember a way to output SQL so that it is readable by row. I believe it was done by adding a "\G" at the end of a query but I can't find any documentation on Google.

1 Answer 1

2

On linux any output with long lines can be viewed this way:

program_that_produces_long_lines | less -S

You will have ability to use arrows to see what is outside the screen.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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.