Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 / madhu sudhan g

Hiii

DELETE T1
OUTPUT DELETED.COLUMN1,DELETED.COLUMN2...
INTO T2
DELETE T2
OUTPUT DELETED.COLUMN1,DELETED.COLUMN2...
INTO T3
DELETE T3
OUTPUT DELETED.COLUMN1,DELETED.COLUMN2...
INTO T4

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to encrypt Strored Procedure in SQL SERVER?

1229


What is collation sensitivity?

1134


What is difference between joins and subqueries?

1171


Is null in sql server?

1042


What is the correct order of the logical query processing phases?

995


When to use Inner join & when to use subquery?

1237


How does stuff differ from the replace function?

1064


What is a transaction and why is it important?

1162


What is the downside of using udf?

1161


What do you mean by subquery?

1147


Explain about Views?

1123


Explain unique key in sql server?

1051


Explain the rules for designing files and file groups in sql server?

1022


What is “begin trans”, “commit tran”, “rollback tran” and “savetran”?

1077


Explain Reporting Life Cycle?

132