搜尋本站文章

2018-04-06

SQL Ops Studio: Connect and query SQL Server using SQL Ops Studio


延續前一篇:SQL Ops Studio: SQL Operations Studio is a free tool

SQL Operations Studio (SQL Ops Studio)  是 Free 免費 的工具。

本次練習,示範:

  • 建立 Connection。
  • 撰寫 SQL Query。
    • 可將結果另存為:CSV、JSON、Excel,或是用 Chart 來顯示。




Connect and query SQL Server using SQL Ops Studio


01. 在 SERVERS ,點選 New Connection 建立新的連線。

-- figure 11_New_Connection





02. 在 Connection,輸入所需資料:


  • 在 Server Name:輸入連線的 SQL Instance。
  • 在 Authentication Type:選擇所需的驗證機制。
  • 點選 Connect 進行連接。


-- figure 12_Input_Server_Name





03. 檢視已經建立的連線。


-- figure 13_Server_DB





04. 建立新的 Query 連線。


  • 點選 已經連線的伺服器,滑鼠又鍵,點選 New Query。
  • 或是 CTRL + N。


-- figure 14_New_Query




05. 在新建立的 Query 連線視窗。

-- figure 15_New_Query





06. 下拉 選擇要連接的 資料庫。


-- figure 16_Choose_Database





07. 輸入要撰寫 T-SQL Query。


  • 選取物件,搭配 TAB,可自動完成。


-- figure 17_Write_Query






08. 執行 T-SQL Query。 

  • 按下 F5
  • 或是,點選 Run 按鈕。



-- figure 18_Choose_DB_Query_Run





09. 檢視 結果輸出視窗。

可將結果另存為:CSV、JSON、Excel,或是用 Chart 來顯示。

-- figure 19_RESULTS_Save





10 . 檢視 Chart 模式。

-- figure 20_View_in_Chart





11. 檢視 另存為 JSON 檔案。


-- figure 21_Save_as_JSON





12. 使用 FOR JSON PATH 語句,將結果顯示為 JSON 格式。


-- figure 22_FOR JSON PATH




13. 檢視 JSON 格式。

-- figure 23_View_JSON







Reference

SQL Ops Studio: SQL Operations Studio is a free tool
http://sharedderrick.blogspot.tw/2018/04/sqlops-sql-operations-studio.html

沒有留言:

張貼留言