MySQL Forums
Forum List  »  Newbie

Re: Multiple table joins
Posted by: markel_mike
Date: May 01, 2005 11:02AM

Of course, you could always append all the files together by either concantenating all the text files into one using your OS shell.... then load the single combined text file into a single MySQL table

OR


You could append all the MySQL tables into one using the following command (from the manual):

1.5.5.2

MySQL Server doesn't support the Sybase SQL extension: SELECT ... INTO TABLE .... Instead, MySQL Server supports the standard SQL syntax INSERT INTO ... SELECT ..., which is basically the same thing. See section 13.1.4.1 INSERT ... SELECT Syntax.

INSERT INTO tbl_temp2 (fld_id)
SELECT tbl_temp1.fld_order_id
FROM tbl_temp1 WHERE tbl_temp1.fld_order_id > 100;

/*************/
as with most things there are several ways to do it.

2 main steps:
1. create a temp table

in your case the syntax would be :
create table tbl_temp
as select table1.description from table1


2. append the same column into tbl_temp for as many tables as you want.
INSERT INTO tbl_temp
SELECT description
FROM table2;

....FROM table3;

...FROM table4;

Options: ReplyQuote


Subject
Written By
Posted
M
April 15, 2005 02:29PM
May 01, 2005 06:11AM
May 01, 2005 10:41AM
Re: Multiple table joins
May 01, 2005 11:02AM
May 01, 2005 12:54PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.