3
我有這樣的SQL:如何獲得MySQL的結果:[select * from mytable AS t]?
SELECT m1.id1,m2.user,m3.pass,m4.cap,m5.test
FROM
(SELECT * FROM mytable) AS m1,
(SELECT * FROM mytable) AS m2,
(SELECT * FROM mytable) AS m3,
(SELECT * FROM mytable) AS m4,
(SELECT * FROM mytable) AS m5
WHERE m1.id1=m2.id2 AND m1.id1=m3.id3 AND m1.id1=m4.id4 AND m1.id1=m5.id5;
表mytable的是巨大的,但我需要從它那裏得到的所有信息,我需要得到多次使用子查詢,問題是:如何保存結果查詢(SELECT * FROM mytable):
SELECT m1.id1,m2.user,m3.pass,m4.cap,m5.test
FROM
(SELECT * FROM mytable) AS m1,
m1 AS m2,
m1 AS m3,
m1 AS m4,
m1 AS m5
WHERE m1.id1=m2.id2 AND m1.id1=m3.id3 AND m1.id1=m4.id4 AND m1.id1=m5.id5;
非常感謝。
你是科羅拉多州最快的一個! –