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

Where can you add custom error messages to sql server?

1053


Can you pass expressions to function parameters?

1030


How to implement service broker?

917


Explain different types of index?

983


What is meant by datasource?

870


Can coalesce return null?

943


Sql studio em braces a variety of capabilities, but will I need them all? Is there a simpler product ? : sql server management studio

854


How to list all user defined functions in the current database?

970


on line cluster can we make if yes tell me the procedure

1973


How can you know if the row fetched from cursor is still valid in underlying table?

950


Can group by be used without aggregate functions?

855


What is the minimum recommended amount of ram for sql server 2012 enterprise?

886


What languages bi uses to achieve the goal?

947


Which are the important points to note when multilanguage data is stored in a table?

907


Can you please explain the difference between primary keys and foreign keys?

1054