我創造了這個觀點被稱爲[供應商名單]需要創建一個查詢,將調用此供應商清單幫助是爲CREATE VIEW
代碼:如何創建一個查詢,將調用您的視圖
CREATE VIEW [Vendors List]
AS
SELECT
VendorID,
SUM(InvoiceTotal) AS [YTD Invoice Total],
SUM(PaymentTotal) AS [YTD Payment Total],
SUM(CreditTotal) AS [YTD Credit Total]
FROM
dbo.Invoices
GROUP BY
VendorID
創建查詢什麼?你想用這個查詢做什麼? – Anand
這是SQL服務器,而不是mysql – e4c5
對不起,我想說的是我必須創建一個查詢,可以調用我上面創建的視圖,顯示上面查詢中的所有列 –