Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > MySQL
|
MySQL General discussion about the MySQL database.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the MySQL section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 16th, 2007, 05:08 AM
Registered User
 
Join Date: Jul 2007
Posts: 6
Thanks: 0
Thanked 1 Time in 1 Post
Default insert same data to another

Hi,

Consider that i have 2 tables. Now i want to insert the data's from first table to second table for the specified condition.



http://hscripts.com
http://withfriendship.com
 
Old July 18th, 2007, 02:31 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Try this...

INSERT INTO <Destination_TableName> SELECT <column_List> FROM <Source_TableName> WHERE <Criteria>

_________________________
- Vijay G
Strive for Perfection
 
Old July 20th, 2007, 12:08 AM
Registered User
 
Join Date: Jul 2007
Posts: 6
Thanks: 0
Thanked 1 Time in 1 Post
Default

It works, Thanks for help.

http://hscripts.com
http://withfriendship.com
The Following User Says Thank You to remo For This Useful Post:
svar (January 3rd, 2009)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Data is not refreshed after an insert TomTab ADO.NET 3 January 19th, 2006 12:24 AM
cannot insert into mysql:data LogicalDevloper Pro PHP 1 December 22nd, 2004 09:08 AM
Help Please with my code to insert data shopgirl Classic ASP Databases 7 February 24th, 2004 01:58 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.