我创建了这个名为[供应商列表]的视图,需要帮助创建一个可以在此处调用供应商列表的查询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
答案 0 :(得分:1)
我无法相信你根据你的问题创建了视图,但是你走了:
select * from [Vendors List]
答案 1 :(得分:0)
从['供应商列表']
中选择*