【问题标题】:I am trying to build a sql view in sqlplus and get the following error我正在尝试在 sqlplus 中构建一个 sql 视图并得到以下错误
【发布时间】:2020-03-28 18:13:10
【问题描述】:

CREATE VIEW V_SALES_REPORT AS SELECT Sales_ID、Sales_Date、Product_ID、Product_Name、Quantity_Sold、Product_Unit_Price、Sales_Price_Per_Unit、(Sales_Price_Per_Unit - Product_Unit_Price)Profit_Amount FROM TBL_STOCK NATURAL JOIN TBL_SALES ORDER BY Profit_Amount DESC、Sales_ID ASC;

得到错误:

第 1 行的错误: ORA-01031: 权限不足 the snapshot

【问题讨论】:

标签: sql oracle ddl sql-view oracle11gr2


【解决方案1】:

您在asselect 之间缺少一个空格:

CREATE VIEW v_sales_report AS SELECT
-- This was missing ---------^

【讨论】:

  • 是的。解决了。谢谢你。请检查新错误
猜你喜欢
  • 2015-06-07
  • 1970-01-01
  • 1970-01-01
  • 2021-08-12
  • 1970-01-01
  • 2018-11-16
  • 2021-07-12
  • 1970-01-01
  • 2020-01-30
相关资源
最近更新 更多