Search code examples
sqloracle10gunordered

sql unordered output (result)


I am using The Oracle Database 10g Express Edition. I just want to know how to fix this problem. I am having a big issue while I want to see information, I mean the output of queries. Just look how untidy, unordered is the output. Thanks! As you can see in the photo


Solution

  • If you are using SQL*Plus, you have some control over formatting via SQL*Plus specific commands. For example:

    SET PAGESIZE 9999
    SET LINESIZE 120
    COL equipo_local FORMAT A12
    

    See the SQL*Plus Reference manual for more SQL*Plus commands.

    SET HEADING OFF
    SET TRIMSPOOL ON
    

    etc.

    If you want rows returned in a particular sequence, add an ORDER BY clause to your query.