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
Where can you add custom error messages to sql server?
Can you pass expressions to function parameters?
How to implement service broker?
Explain different types of index?
What is meant by datasource?
Can coalesce return null?
Sql studio em braces a variety of capabilities, but will I need them all? Is there a simpler product ? : sql server management studio
How to list all user defined functions in the current database?
on line cluster can we make if yes tell me the procedure
How can you know if the row fetched from cursor is still valid in underlying table?
Can group by be used without aggregate functions?
What is the minimum recommended amount of ram for sql server 2012 enterprise?
What languages bi uses to achieve the goal?
Which are the important points to note when multilanguage data is stored in a table?
Can you please explain the difference between primary keys and foreign keys?