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:
Did you know?Explore Trending and Topic pages for more stories like this.
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

Little problem with form insertion in MySQL, Please help!!!
Hi!,

I'm a little bit new with php and I have a little issue here. I created a webform to ins

About imagecopyresampled()
Hello,

I am looking to use this function to resize parts of an image to a fixed thumbnail siz

Function to extract email attachments using PHP IMAP
function extract_attachments($connection, $message_number) {

$attachments = array();

License Issue - service type user
Hi,

I would like to understand the following issue regarding sap license.
I wish to

How do i use vars in an array
Hiya peeps!

How do I use a var in an array. You will see $id but it isnt working.


PHP error on MySQL insert
I'm sure it's the simplest of issues, but I can't recall why this isn't working.

Code: [Selec

Include with Parameters
In a particular page I would like to include a file that requires $_GET parameters.

when I go

getting weird error..
okay, I'm getting an error on this particular function, something about the syntax in the mysql LIMI

Date help - fetch dates for Mondays between xxx and yyy?
Does anyone know the best way to do this? I have two dates, say:

2010-01-26 and 2010-05-30

I face problems to extract data from one table and insert it in another one
Hi,

For modifications, I have to extract data from one table and insert it in another one

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