我正在尝试在Postgresql中创建一个查询,在调用时将从运行时从两个表中获取数据并将其交还给调用程序。记录需要更新,所以我希望我正确地做到这一点。我感到困惑的地方是:
create view workorderquery as SELECT PartsWorkOrder.*, Copiers.*
FROM PartsWorkOrder RIGHT JOIN Copiers ON PartsWorkOrder.Printer = Copiers.Copier as query;
和
create view workorderquery as SELECT PartsWorkOrder.*, Copiers.*
FROM PartsWorkOrder RIGHT JOIN Copiers ON PartsWorkOrder.Printer = Copiers.Copier;
我最后需要'as query'吗?如果是这样,为什么我会收到错误?