|
| cc:
|
| Fax to:
|
|
Bruce,
>i have two hypothetical tables
>create table owner (
>-> name char(20) ,
>-> ownerid int(10) auto_increment primary key);
>create table dog (
>-> name char(20) ,
>-> ownerid int(10),
>-> dogid int(10) auto_increment primary key);
>i'm curious as to how i'd go about in
ql question
>
>
> Hi,
>
> The insert says 'insert data in to two columns, name
> and collegeid'.
>
> The select says "get two columns, 'tom' and id" -
> 'tom' is a fixed value, the same for each row, and
> id is taken from the test table.
al Message-
From: Quentin Bennett [mailto:[EMAIL PROTECTED]
Sent: Sunday, July 04, 2004 3:49 PM
To: [EMAIL PROTECTED]
Cc: MySQL (E-mail)
Subject: RE: mysql sql question
Hi,
The insert says 'insert data in to two columns, name and collegeid'.
The select says "get two columns, 'to
of the insert be derived from..
-bruce
-Original Message-
From: Quentin Bennett [mailto:[EMAIL PROTECTED]
Sent: Sunday, July 04, 2004 3:41 PM
To: [EMAIL PROTECTED]; Emmett Bishop; [EMAIL PROTECTED]
Subject: RE: mysql sql question
Hi,
You've already specified some values, so you c
mysql> insert into dept (name,collegeid)
-> select name, id from test where name="sammy";
-Original Message-
From: bruce [mailto:[EMAIL PROTECTED]
Sent: Monday, 5 July 2004 10:50 a.m.
To: Quentin Bennett
Subject: RE: mysql sql question
i can't see how this would wor
to:[EMAIL PROTECTED]
Sent: Monday, 5 July 2004 10:41 a.m.
To: 'Emmett Bishop'; [EMAIL PROTECTED]
Subject: RE: mysql sql question
i created the following as a simple test...
mysql> describe test;
+---+--+--+-+-+
7;t it be possible
to extend the basic approach to multiple tables, using FROM tbl1, tbl2,
tbl3..
-
-Original Message-
From: bruce [mailto:[EMAIL PROTECTED]
Sent: Sunday, July 04, 2004 3:26 PM
To: 'Emmett Bishop'; [EMAIL PROTECTED]
Subject: RE: mysql s
me = $ownername;
-bruce
-Original Message-
From: Emmett Bishop [mailto:[EMAIL PROTECTED]
Sent: Sunday, July 04, 2004 12:59 PM
To: [EMAIL PROTECTED]
Subject: Re: mysql sql question
Bruce,
what you want it the insert into ... select statement.
It's like this:
insert into dog (name,
riginal Message-
From: Paul DuBois [mailto:[EMAIL PROTECTED]
Sent: Sunday, July 04, 2004 12:59 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: mysql sql question
At 12:54 -0700 7/4/04, bruce wrote:
>hi...
>
>i have two hypothetical tables
>create table ow
At 12:54 -0700 7/4/04, bruce wrote:
hi...
i have two hypothetical tables
create table owner (
-> name char(20) ,
-> ownerid int(10) auto_increment primary key);
create table dog (
-> name char(20) ,
-> ownerid int(10),
-> dogid int(10) auto_increment primary key);
i'm curious as
11 matches
Mail list logo