i have 4 tables.. T1, T2, T3, T4..
these tables have the same structure and they store the
information entered in different years..
T1 stored 2002, T2 stored 2003, T3 stored 2004 and T4 stored
2005..

i want to copy contents in T1 to T2, T2 to T3, T3 to T4 and
T4 to T1..
how do i do that? Temp tables cannot be used..

Answer Posted / siva

insert into T1
select *from t2
union/union all (without duplicates/with duplicates )
select *from t3

union/union all
select *from t4
.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain different types of self contained sub query?

729


How to define and use table alias names in ms sql server?

742


Explain the difference between function and stored procedure?

681


How to retrieve field values using mssql_result()?

808


How to rename an existing column with sql server management studio?

678






Explain the use of containers in ssis and also their types?

704


What happens when unicode strings concatenate with non-unicode strings?

733


Do you know what is xpath?

725


Call by value and call by reference in procedure and function, with NOCOPY.

1045


Is sql different from sql server?

689


How to use clusters?

693


How adventureworkslt tables are related?

681


Explain how to use linked server?

739


What is postgresql server?

687


What are the difference between data mart and data warehouse? : sql server analysis services, ssas

706