List:MySQL on Win32« Previous MessageNext Message »
From:Tim Endres Date:January 8 2001 7:31pm
Subject:Re: SQL...
View as plain text  
Is the problem with your SQL? In other words, I do not think INSERT is designed
to handle multiple rows. Have you tried something more along the lines of:

INSERT INTO database1.table1 VALUES (SELECT * FROM database2.table2 WHERE ...)

in which your WHERE clause limits the select result to one row?

tim.

> Hi,
> it means, you could for example select data from one table without
> use at first of  "use database..." ...
> 
> ex.
> select * from database.table;
> 
> I still don't know, how should I use it.
> Something like:
> insert into database1.table1 select * from database2.table2...
> doesn't work, or maybe you mean something another....
> 
> regards
> jed
> 
> Paul DuBois wrote:
> 
> > You can access multiple databases on the same server if you qualify table
> > names as necessary with leading database names (e.g., db_name.tbl_name).  You
> > can't access databases on different servers within the same statement.
> >
> > >>  Hi @,
> > >>  one question,
> > >>
> > >>  Is there any possibility to transfer the data from one table of one
> database
> > >>  to another table of another database...
> > >>
> > >>  I'll try to be creativ.... :-)
> > >>
> > >>  insert into database1.table1 select * from database2.table2....
> > >>
> > >>  or something like this...
> > >>
> > >>  Any Ideas?
> > >>
> > >>  Regards
> > >  > jed

Thread
Danger! Will Robinson - NewbieSteve Mills7 Jan
  • Re: Danger! Will Robinson - NewbieJohn Dean7 Jan
    • SQL...jed7 Jan
RE: SQL...Rasmus Nyström7 Jan
  • Re: SQL...Jr. Frank M. Betz8 Jan
    • Re: SQL...Paul DuBois8 Jan
      • Re: SQL...Nick Tentomas8 Jan
        • Re: SQL...Paul DuBois8 Jan
    • RE: SQL...Luc Van der Veken9 Jan
      • Re: SQL...jed9 Jan
        • Re: SQL...Paul DuBois9 Jan
      • Re: SQL...Stephen Woodbridge9 Jan
        • RE: SQL...Luc Van der Veken10 Jan
          • Re: SQL...jed10 Jan
      • Re: SQL...jed9 Jan
      • RE: SQL...Paul DuBois9 Jan
      • Re: SQL...jed9 Jan
  • Re: SQL...jed8 Jan
  • Re: SQL...jed8 Jan
    • Re: SQL...Tim Endres8 Jan
      • Re: SQL...Paul DuBois9 Jan
    • Re: SQL...Paul DuBois9 Jan