How to display fields and values in sql+ for Oracle DB

Hello,

I'm trying to do a select for an Oracle table but the output gives me only filelds values without fields name as in Informix.
Is there anyway to display both in output ?
For instance, the output will be :

 
Name      Rico
Age        30
Position   Engineer

Thx,

Hi
Are you trying this from sqlplus? If so, make sure the "set header off" is not done.

Guru.

?
The field names are usually the first line printed...
The output would have been:

NAME   AGE     POSITION
-----   ---    ----------

First    20     blahblah
Rico     30     Engineer
third
etc

Hi,

For Guru,
yes, I'm using sqlplus but I don't have this variable "header" ...

For vbe,
I put pages to 0 so that's why filelds name were not displayed. But the problem is that if I don't put it to 0, it displays for me all fields which are not null and null and the output becomes hard to read.
So is there anyway to display only not null fields with their values with a select command ?

Thx,

sqlplus does that anyway, whether or not you set pagesize to 0.
That is, sqlplus fetches all column values (NULL as well as NOT NULL) as specified in your SELECT <column_list>, irrespective of the pagesize setting.

Do you mean something like this ?

select x, y, z from t where x is not null and y is not null and z is not null;

This query will fetch all rows from table T that have NON NULL values for each column X, Y and Z.

Otherwise, please post a simple and reproducible example of what the problem is and what you are trying to accomplish.

tyler_durden

Hi,

Thx to all. I have to put fields names in the select to get it work as suggested by Tyler, before I was putting select * ...

thx & Regs,