试图定义where子句中应该包含哪些内容?

时间:2013-12-19 11:36:49

标签: sql

这是我正在使用的代码 - 我正在创建一个包含5列的新视图(SEWEBCAT列内容与任何表内容无关)。我认为它似乎没问题,但我不知道缺少什么'WHERE'条款?

 CREATE OR REPLACE FORCE VIEW NewView_VW
   (
   URL,
   ORGANISATION,
   SEWEBCAT,
   SEARCH_DESC,
   SEARCH_TAG
    )
   AS
   SELECT   Table1.URL,
            Table2.ORGANISATION,
            Table1.SEARCH_DESC,
            Table1.SEARCH_TAG,
   FROM     Table1,
            Table2

   WHERE CODE_HERE;

   DROP PUBLIC SYNONYM NewView;

   CREATE PUBLIC SYNONYM NewView FOR NewView_VW;

    DROP PUBLIC SYNONYM NewView_VW;

   CREATE PUBLIC SYNONYM NewView_VW FOR 
    SChemaName.NewView_VW;


  GRANT SELECT ON SchemaName.NewView_VW TO PUBLIC;

1 个答案:

答案 0 :(得分:0)

这是无效的WHERE语句:

WHERE CODE_HERE;

如果您不打算使用WHERE子句,只需删除整行。