我刚开始阅读视图教程
我用过这个链接视图教程
在他们的教程中他们说
Subquery cannot be included in the SELECT statement.
Run Code Online (Sandbox Code Playgroud)
但他们举了一个例子,
CREATE VIEW vwProducts AS
SELECT productCode,
productName,
buyPrice
FROM products
WHERE buyPrice > (
SELECT AVG (buyPrice)
FROM products
)
ORDER BY buyPrice DESC
Run Code Online (Sandbox Code Playgroud)
告诉我,是否可能,
在视图中我们是否应该使用子查询,