Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Sql Query
Here is a fairly straightforward SQL which does precisely what you want.
DECLARE outl VARCHAR2(32767);
CURSOR csr IS
SELECT TABLE_NAME
FROM all_tables;
BEGIN
FOR c IN csr
LOOP
outl := outl || c.TABLE_NAME || ',';
END LOOP;
DBMS_OUTPUT.PUT_LINE(TRIM(TRAILING ','
FROM outl));
END;
/
On 05/04/2006 02:11:38 PM, Sanjay Mishra wrote:
> Sql Gurus
>
> I need to create the sql script that can display all tables from user_tables in one line seperated by ",". Is there any straighforward SQL that can display the result in Horizontal instead of single table in each row.
>
> Regds
> Sanjay
>
>
> ---------------------------------
> Yahoo! Mail goes everywhere you do. Get it on your phone.
-- Mladen Gogala http://www.mgogala.com -- http://www.freelists.org/webpage/oracle-lReceived on Thu May 04 2006 - 21:29:48 CDT
![]() |
![]() |