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

Posting Serialized Data Not Working
I am trying to send an object from one PHP file to another using POST. I serialize the object and th

matching numbers inside ( )
I know I can match numbers by just [0-9]+, so I thought matching numbers inside ( ) would be somethi

ALV grid with 2 headers
Hi Gurus,

I need to display ALV GRID as below.

Header1

Header is not working in IE
Hi ! header function is not working in IE but it works in FF, Safari, Chrome. any help please. :

Load Animated Image while cache is serve
I have a page that loads up using cache and took about 1 to 2 minutes before it loads to the page. <

Working with popups and such in a class
I've recently started building my applications completely enclosed in classes. I like the fact that

writing a screen scraper
Hello,

I'm writing a screen scraper application and want to be able to get absolute addresses

login from external site
Hi my new experience begins, Now what i am trying to do is i make three pages, login.php logout.php

PHP and MySQL Question/Help
I have a MySQL db with all my servers and all their details like server name, IP, OS, RAM etc etc 26

Parse Error with doctype
I'm getting a parse error with this simple code. I don't get it. It worked one time then when I relo

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