Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2003
    Location
    Ireland
    Posts
    9

    Unanswered: Oracle table viewing???

    Hi there,
    Can anyone tell me how to change the width of a table so that i can view the column contents better?? I'm new to Oracle and SQL and haven't got a clue where to start looking for info.

    Rho

  2. #2
    Join Date
    Sep 2003
    Location
    Assen, Nederland
    Posts
    55
    what exactly do you mean by width of a table?
    Hope that helped...
    Visit My Website : http://www.oraflame.com
    _____________________________
    Tarry Singh

    OCP DBA 8i
    Currently: SQL Server DBA 7,2000
    Oracle, PHP Programmer

  3. #3
    Join Date
    Oct 2003
    Location
    Ireland
    Posts
    9

    Re: Oracle table viewing

    Hi,
    When I select the data to view it in my terminal window, the data is all scrunched up. Column 1 and 2 contain text but when i view them the text from column 2 is lined up under the text from column 1. The data is in the right place as i have checked for this by selecting the columns on their own.
    eg. This is how it looks in my terminal window:
    COLUMN 1
    ----------------------
    COLUMN 2
    ----------------------
    Data for column 1
    Data for column 2
    Hope you can help,
    Rho

  4. #4
    Join Date
    Oct 2003
    Posts
    26

    Re: Oracle table viewing

    First you can increase the linesize by using set linesize 1000 on the sqlplus prompt

    Then to set column formats for the individual columns use column <col name> format <Format>

    Ex
    Table Emp has 3 cols EmpNo,Ename,Dept

    column EmpNo format 9999
    column Ename format A30
    column Dept format 999

    select * from emp;

    Refer to sqlplus reference on the Oracle docs for more informatiopn

  5. #5
    Join Date
    Sep 2003
    Location
    CA
    Posts
    38

    Re: Oracle table viewing???

    Hi,
    U can also try the following options for formatting ur output
    set pagesize 100;
    set long 1400;
    col <colname> format a40 word_wrap;
    this might sure help u i guess
    Pooja


    Originally posted by Rho
    Hi there,
    Can anyone tell me how to change the width of a table so that i can view the column contents better?? I'm new to Oracle and SQL and haven't got a clue where to start looking for info.

    Rho

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •