在MyEclipse中的Visual SQL查詢編輯器可用於輕松創建復雜的SQL語句,同時還無需記住其語法。不僅如此,它還利用易於使用的向導來直觀地添加表、創建連接、管理組、表達式以及輸出命令等等。在本教程中,您將學習到:
打開Visual SQL查詢編輯器
將表添加到查詢中並創建連接
構建一個表達式
運行該SQL
沒有MyEclipse?小編推薦《MyEclipse破解版下載》
1. 打開Visual SQL查詢編輯器
這裡有幾種方法可以用來訪問Visual SQL查詢編輯器。
1.1 從SQL編輯器中打開
右鍵單擊SQL編輯器,然後選擇Open in MyEclipse Visual SQL Query Editor。當您使用完Visual SQL查詢編輯器時,你所創建的查詢將被插入到SQL編輯器中,如果有的話它將取代選擇查詢。

打開Visual SQL查詢編輯器
1.2 打開現有SQL文件
右鍵單擊SQL文件,然後單擊Open With>MyEclipse Visual SQL Query Editor。

在Visual SQL查詢編輯器中打開SQL文件
1.3 打開數據庫連接
右鍵單擊數據庫浏覽器連接,並選擇New Visual SQL Query Editor。

從連接中打開查詢編輯器
2. 將表添加到查詢中並創建連接
(1)右鍵單擊編輯器,然後選擇Add Table。

在查詢中添加表
(2)選擇一個表,然後在你的查詢中使用它並單擊OK。

選擇一個表添加到查詢中
(3)從一列拖動到另一列中,在兩者之間創建一種連接。

創建連接
3. 為您的輸出構建表達式
(1)從Column的下拉列表中選擇Build Expression。

構建一個表達式並在輸出在顯示結果