[前][次][番号順一覧][スレッド一覧]

mysql:12647

From: "F.Y" <"F.Y" <fumi_sby@xxxxxxxxxx>>
Date: Wed, 18 Jan 2006 09:37:58 +0900 (JST)
Subject: [mysql 12647] Re: Insert 構文で alias って使えない?

今度はinsert into t1 が抜けてた…orz
ML汚してすんません
これが間違っててももう黙ります

insert into t1(name, tel1, tel2, tel3)
select t1.name, t2_1.tel, t2_2.tel, t2_3.tel
from t1,
t1 as t1_1 left outer join t2 as t2_1 on t1_1.code1 = t2_1.code,
t1 as t1_2 left outer join t2 as t2_2 on t1_2.code2 = t2_2.code,
t1 as t1_3 left outer join t2 as t2_3 on t1_3.code3 = t2_3.code
where t1.name = t1_1.name
and t1.name = t1_2.name
and t1.name = t1_3.name;


--------------------------------------
GANBARE! NIPPON!
Yahoo! JAPAN JOC OFFICIAL INTERNET PORTAL SITE PARTNER
http://pr.mail.yahoo.co.jp/ganbare-nippon/

[前][次][番号順一覧][スレッド一覧]

     12642 2006-01-17 21:19 [Shuichi Nakagawa <na] Insert構文でaliasって使えない?         
     12643 2006-01-18 07:02 ┗[oppara <mlml@xxxxxxx]                                       
     12644 2006-01-18 08:29  ┗[Shuichi Nakagawa <na]                                     
     12645 2006-01-18 09:07   ┗["F.Y" <fumi_sby@xxxx]                                   
     12646 2006-01-18 09:27    ┣["F.Y" <fumi_sby@xxxx]                                 
->   12647 2006-01-18 09:37    ┃┗["F.Y" <fumi_sby@xxxx]                               
     12648 2006-01-18 09:58    ┗[Shuichi Nakagawa <na]                                 
     12649 2006-01-18 10:12     ┗["F.Y" <fumi_sby@xxxx]                               
     12650 2006-01-18 10:40      ┗[Shuichi Nakagawa <na]                             
     12651 2006-01-18 11:40       ┗[Shuichi Nakagawa <na]