3

When I issue a query like select * from city; using oracle sql developer in mac I get the output that is not aligned and it is very hard to read. How do I get the grid view and set it as default?

4
  • And what exactly is not aligned? A picture would be helpful to understand. Commented May 8, 2016 at 9:27
  • 1
    Are you running as a script or as a statement? Do you meam an actual data grid or just neat script output? Is your output just wrapping onto multiple lines per row? Commented May 8, 2016 at 9:36
  • output wrapping on to multiple lines per row but when I do set wrap off now all my inserted lines are gone. I dont see them anymore and the count(*) returns 0. I inserted bunch of rows using @path_to_file.sql in my worksheet Commented May 8, 2016 at 10:35
  • Finding no data is nothing to do with wrapping. Are you still in the same session you did the inserts? Did you commit the changes (or roll them back)? Commented May 8, 2016 at 14:04

2 Answers 2

4

Sounds like you're getting the script output. You can have that formatted nicely by using SET SQLFORMAT ansiconsole, we'll make the columns line up as nice as possible based on the size of the display.

enter image description here

But if you want the data back in a grid, use Ctrl+Enter or F9 or the first execute button in the toolbar to execute.

enter image description here

This will get you the output in a grid, like this:

enter image description here

I talk about both executing as a script or statement here.

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

1 Comment

Thank you. Coming from Microsoft Management Studio, I was used to pressing F5 to execute a query, which by default displays as a grid. It looks like Ctrl + Enter is what is needed.
1

If your issue is with formatting, you may want to look at this link

If your issue is with records not getting inserted, please note these.

  1. Records inserted in one session will not be visible in another session unless they are committed.
  2. If you are checking the count in the same session where you inserted the records, then check for errors in insert. Add a show errors command at the end of your script, "path_to_file.sql" to check if any errors occurred while inserting the records.

Hope this helps.

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.