Follow Fantora on Twitter
Fantora Word of Classified Ads and Community Forum
Welcome Guest Search | Active Topics | Members | Log In | Register

how to copy data from one table to other in SQL Server

Options
adam
Posted: Monday, February 02, 2009 7:09:06 AM
Rank: Advanced Member
Groups: Member

Joined: 4/3/2008
Posts: 173
Points: 525
Location: London

how to copy data from one table to other in SQL Server

hi all

i'm trying to writing a query that copies data from one SQL Server table to another table. can anybody please help me?
ca4nul
Posted: Monday, February 02, 2009 7:22:20 AM
Rank: Advanced Member
Groups: Member

Joined: 11/9/2007
Posts: 489
Points: 1,042
Location: UK

how to copy data from one table to other in SQL Server

adam wrote:
hi all

i'm trying to writing a query that copies data from one SQL Server table to another table. can anybody please help me?



copying from one table to other

Code:
INSERT INTO TABLE2 SELECT * FROM TABLE1



copying from one table to other with some condition

Code:
INSERT INTO TABLE2 SELECT * FROM TABLE1 WHERE COL1 = 'A'


copying specific rows from one table to other

Code:
INSERT INTO TABLE2 (COL1, COL2, COL3) SELECT COL1, COL4, COL7 FROM TABLE1
Users browsing this topic
Guest

 Related
Business development
In defence of SQL
TV: Navy NCIS episode.
Integration Solutions Possible without writing Codes
Innovative Enterprise Application Integration
Upcoming Webinar: Reduce IT infrastructure costs using Application Portfolio Management
Highly configurable and extensible Dataflow architecture
Upcoming Webinar: Best Practices and Proven Techniques for Application Portfolio Management
Recorded Webinar: Data Management Challenges for Govt Applications
Elegant dataflow solution
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

Powered by: YAF.NET
Copyright © AI Logica All rights reserved.
This page was generated in 0.166 seconds.