2013-11-21 34 views
0

我嘗試從數據庫導出數據,但在phpmyadmin我沒有選擇將其轉儲到SQL格式。Sql導出爲選擇結果

SELECT email 
FROM users, 
    profiles 
WHERE users.id = profiles.user_id 
    AND profiles.country_id = 1 

我在SQL並不好 - 爲什麼我不能轉儲這SQL格式形式的phpmyadmin

回答

1

有下面的結果導出選項。 enter image description here

編輯:

您需要選擇單表例如

SELECT email 
FROM users 
WHERE userid IN (SELECT userid 
        FROM users, 
         profiles 
        WHERE users.id = profiles.user_id 
         AND profiles.country_id = 1) 
+0

是知道如何做到這一點,我這樣做,但與此選擇我沒有格式到SQL。當你點擊「導出」時,你可以選擇你想要保存轉儲的格式 - 並且這個選擇沒有SQL – Wordica

+0

我看到了......它不能生成SQL,所加入的表的cuz –

+0

所以我如何轉儲sql格式那種數據?我需要來自用戶的電子郵件profiles.country_id = 2 – Wordica