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
How to encrypt Strored Procedure in SQL SERVER?
What is collation sensitivity?
What is difference between joins and subqueries?
Is null in sql server?
What is the correct order of the logical query processing phases?
When to use Inner join & when to use subquery?
How does stuff differ from the replace function?
What is a transaction and why is it important?
What is the downside of using udf?
What do you mean by subquery?
Explain about Views?
Explain unique key in sql server?
Explain the rules for designing files and file groups in sql server?
What is “begin trans”, “commit tran”, “rollback tran” and “savetran”?
Explain Reporting Life Cycle?