Whenever, I select rows from our tables, the results are very hard to read as they get wrapped over several lines. Is there a way by which we can format all the columns in them to a more readable format ? like trim the varchars.
It will be great if there is a script for this, eg called setTableFormat.sql. Just before I select data from tables, in sql prompt, I can call this script. The script must be a generic one for all tables, I do not want to specify the column names there.
If you know of anything like that, please let me know
select * from userdetails; //this table has 2 rows
It first displays all the headings for 1 row. This takes up 2 lines. Then it displays the row. This also takes up another 2 lines with lots of blank spaces in between ( as many cols are null). Then it displays the second row (2 more lines) and THEN it displays the column names again (2 more lines). Can this be compacted and trimmed out ? like display the column names first in one line and the values for the columns in 1 line each ? Because, though I have set my column size to be varchar2 (30). The value in it is only 10 chars. Can I set a default to trim those column values ? I think right now, each column is taking up as much space as specified, though the data isnt that long.