|
-
But first tell me why do u need such a thing .
Hi ,
Definetly u can select all the rows from all the tables from one or more user .
let me know if column names and data types are same in all the tables . then it will be simpler .
select col1 , col2 , col3 from tab1 ;
union
select col1 , col2 , col3 from tab2 ;
union
......
......
if table structures are different ( column names , datatypes , number of columns in a table ) then u have to follow different procedure .
1) use aliases for each column name .
2) put all datatypes column in one row.
3) see that each select statement has same number of columns when using UNION Clause .
ex :
select eff_dt date , empno NUM01 from tab1 ;
union
select dep_dt date , deptno NUM01 from tab2 ;
union
select ced_dt date , null from tab3 ;
....
....
Hope this helps you .
siva prakash
DBA
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|