Select Rows as Columns..


Posted on 16th Feb 2014 07:03 pm by admin

is there a way to select COLUMN_NAME from user_tab_columns where table_name='TABLENAME';
and have the output as:
COL1, COL2, COL3
instead of:
COL1,
COL2,
COL3

I'd actually like this full statement to be viewed as:
select COLUMN_NAME,DATA_TYPE,DATA_LENGTH,DATA_PRECISION,DATA_SCALE,NULLABLE from user_tab_columns where table_name='EMP';

EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO
NUMBER,VARCHAR2,VARCHAR2,NUMBER,DATE,NUMBER,NUMBER,NUMBER
22,10,9,22,7,22,22,22
......ect.........

No comments posted yet

Your Answer:

Login to answer
327 Like 34 Dislike
Previous forums Next forums
Other forums

Undefined Variable: PHP_SELF, pls help
Hi,

Im a newbie on PHP / MySQL programming and Im running a script to search one field on my

Grouping and sorting results
Please help with this query.

I have 2 tables in a database, countires and cities. states look

Slashes
Have a small problem and I'm not able to understand why I'm getting the results I'm getting... and i

Sending a hyperlink through mail
HI all,
I am sending a mail to outlook mailbox of a user using FM SO_NEW_DOCUMENT_ATT_S

PHP & Java
Hello,

can PHP code be used inside java code?

Code: <SCRIPT LANGUAGE="Java

Need help with basic sql
Hi,

I am using oracle 10g, and having some small doubts related to sql , here goes the si

Internal Server Error issues
This has been bothering me for weeks and I've been trying to solve it without asking for help, but e

Consuming MII WebService in Java WebDynpro
Hello,

We are facing a strange situation...

We define a transaction in MII to

Where is my php.ini???
Hi

First off - apologies - i'm not a coder so this may sound very amateur.

I'm having

database design
Hi,

I got a page which allow candidate to type in their previous working experience,
I let

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash