<delect id="sj01t"></delect>
  1. <em id="sj01t"><label id="sj01t"></label></em>
  2. <div id="sj01t"></div>
    1. <em id="sj01t"></em>

            <div id="sj01t"></div>

            微軟認證sql考試練習試題及答案

            時間:2024-10-28 19:40:09 微軟認證 我要投稿
            • 相關推薦

            微軟認證sql考試練習試題及答案

              第1題

            微軟認證sql考試練習試題及答案

              公司在數據庫中存儲供應商和價格信息。數據庫中的所有商品都有牌價(list price)。 你需要只將供應商Fabrikam的所有產品的牌價提高20.00。應使用哪個查詢?

              A. UPDATE Production.Product SET ListPrice = ListPrice + 20.00 WHERE NOT EXISTS ( SELECT VendorId FROM Purchasing.Vendor WHERE VendorName = ’Fabrikam’);

              B. UPDATE Production.Product SET ListPrice = ListPrice + 20.00 WHERE VendorId NOT IN ( SELECT VendorId FROM Purchasing.Vendor WHERE VendorName = ’Fabrikam’);

              C. UPDATE Production.Product SET ListPrice = ListPrice + 20.00 WHERE EXISTS ( SELECT VendorId FROM Purchasing.Vendor WHERE VendorName = ’Fabrikam’);

              D. UPDATE Production.Product SET ListPrice = ListPrice + 20.00 WHERE VendorId IN (SELECT VendorId FROM Purchasing.Vendor WHERE VendorName = ’Fabrikam’);

              答案:D

              第2題

              你有名為Customer和SalesOrder的兩個表。 你需要找出尚未采購任何東西的所有客戶, 以及那些訂單總額 (OrderTotal) 不到100的客戶。應使用哪個查詢?

              A. SELECT * FROM Customer WHERE 100 > ALL ( SELECT OrderTotal FROM SalesOrder WHERE Customer.CustomerID = SalesOrder.CustomerID)

              B. SELECT * FROM Customer WHERE 100 > SOME ( SELECT OrderTotal FROM SalesOrder WHERE Customer.CustomerID = SalesOrder.CustomerID)

              C. SELECT * FROM Customer WHERE 100 > ( SELECT MAX(OrderTotal) FROM SalesOrder WHERE Customer.CustomerID = SalesOrder.CustomerID)

              D. SELECT * FROM Customer WHERE EXISTS ( SELECT SalesOrder.CustomerID FROM SalesOrder WHERE Customer.CustomerID = SalesOrder.CustomerID AND SalesOrder.OrderTotal <= 100)

              答案:A

              第3題

              你有名為Customer和SalesOrder的兩個表。Customer表中有1000個客戶,SalesOrder表中有其中900個客戶的訂單。你 執行下面的查詢來列出至少有一筆銷售的所有客戶。 SELECT * FROM Customer WHERE Customer.CustomerID IN (SELECT Customer.CustomerID FROM SalesOrder)

              你需要確定查詢的結果。該查詢應返回什么結果?

              A. 沒有行

              B. 警告消息

              C. Customer表中的1000行

              D. Customer表中與SalesOrder表中的行匹配的900行。

              答案:C

              第4題

              Customer表中有下面的行:CustomerId Status 1 Active 2 Active 3 Inactive 4 NULL 5 Dormant 6 Dormant 你編寫了下面 的查詢來返回狀態不為NULL或“Dormant”的所有客戶: SELECT * FROM Customer WHERE Status NOT IN (NULL, ’Dormant’) 你需要確定查詢的結果。你預計應出現哪個結果?

              A. CustomerId Status

              B. CustomerId Status 1 Active 2 Active 3 Inactive

              C. CustomerId Status 1 Active 2 Active 3 Inactive 4 NULL

              D. CustomerId Status 1 Active 2 Active 3 Inactive 4 NULL 5 Dormant 6 Dormant

              答案:B

              第5題

              你有一個名為Employee的表。 你將每個員工的經理EmployeeID插入ReportsTo列來記錄公司的組織層次結構。你需要 編寫遞歸查詢來生成員工及其經理的列表。 該查詢還必須包含員工在層次結構中的級別。 你編寫了下面的代碼片段。 (包含的行號僅供參考。) 01 WITH EmployeeList (EmployeeID, FullName, ManagerName, Level)02 AS (03 ......... 04 )05 SELECT EmployeeID, FullName, ManagerName, Level06 FROM EmployeeList; 應在第3行插入哪一個代碼片段?

              A. SELECT EmployeeID, FullName, ’’ AS [ReportsTo], 1 AS [Level] FROM Employee WHERE ReportsTo IS NULL UNION ALL SELECT emp.EmployeeID, emp.FullNName, mgr.FullName, 1 + 1 AS [Level] FROM Employee emp JOIN Employee mgr ON emp.ReportsTo = mgr.EmployeeID

              B. SELECT EmployeeID, FullName, ’’ AS [ReportsTo], 1 AS [Level] FROM Employee WHERE ReportsTo IS NULL UNION ALL SELECT emp.EmployeeID, emp.FullName, mgr.FullName, mgr.Level + 1 FROM EmployeeList mgr JOIN Employee emp ON emp.ReportsTo = mgr.EmployeeId

              C. SELECT EmployeeID, FullName, ’’ AS [Reports To], 1 AS [Level] FROM Employee UNION ALL SELECT emp.EmployeeID, emp.FullName, mgr.FullName, 1 + 1 AS [Level] FROM Employee emp LEFT JOIN Employee mgr ON emp.ReportsTo = mgr.EmployeeID

              D. SELECT EmployeeID, FullName, ’’ AS [ReportsTo], 1 AS [Level] FROM Employee UNION ALL SELECT emp.EmployeeID, emp.FullName, mgr.FullName, mgr.Level + 1 FROM EmployeeList mgr JOIN Employee emp ON emp.ReportsTo = mgr.EmployeeID

              答案:B

            【微軟認證sql考試練習試題及答案】相關文章:

            微軟認證考試試題及答案「經典版」08-21

            2017年sql認證考試練習試題09-07

            2017年sql認證考試試題及答案11-02

            2017微軟認證考試aspnet模擬練習及答案08-11

            2016年微軟認證考試試題及答案09-23

            2017年微軟認證考試試題及答案10-17

            2017微軟認證考試企業技術模擬練習及答案06-28

            2017微軟認證考試flash練習題及答案06-16

            2017微軟認證考試aspnet練習題及答案05-31

            2016年微軟認證考試模擬試題(附答案)09-03

            <delect id="sj01t"></delect>
            1. <em id="sj01t"><label id="sj01t"></label></em>
            2. <div id="sj01t"></div>
              1. <em id="sj01t"></em>

                      <div id="sj01t"></div>
                      黄色视频在线观看