Sql Query to list tablenames and column_names. [message #1498] |
Mon, 06 May 2002 21:16 |
karunamoorthy_p
Messages: 13 Registered: April 2002
|
Junior Member |
|
|
Could you please help me to solve the following query.
I have following sample tables viz.
1. bonus table
(ename,job,sal,comm).
2. dept table
(deptno,dname,loc)
3. emp table
(empno,ename,job,mgr,hiredate,sal,comm,deptno)
My output required is like this:-
--------------------------------
TABLENAME COLUMN_NAME
--------- -----------
bonus ename
bonus job
bonus sal
bonus comm
dept deptno
dept dname
dept loc
emp empno
emp ename
emp job
emp mgr
emp hiredate
emp sal
emp comm
emp deptno
How to get the above result using simple sql query.
(ie. both tablename and the corresponding column_names).
Please help.
|
|
|
|
|
|