【问题标题】:how to add a inner join clause in a update statement如何在更新语句中添加内部连接子句
【发布时间】:2017-01-06 07:50:43
【问题描述】:

当我使用内部联接运行以下查询时,它给了我以下错误

"ORA-00933: SQL command not properly ended" 在我的 from 子句中。我没有以正确的格式定位它吗?

update
             Table t

    set
         t.gross =4000
 FROM Schema1.Table  t INNER JOIN schema2.TYPES AS gt ON t.GRADE=gt.DESCRIPTION
    where
       GT.GRADE_TYPE_CODE='test'

【问题讨论】:

标签: oracle inner-join


【解决方案1】:

我认为你的问题已经在 stackoverflow 上。

这可以帮助你:

https://stackoverflow.com/a/2446834/6517368

【讨论】:

    【解决方案2】:

    试试这个:

    UPDATE         TABLE t
        set          t.gross =4000
      where  t.GRADE in (   select gt.DESCRIPTION from  schema2.TYPES gt where
           GT.GRADE_TYPE_CODE='test')
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-12-10
      • 2023-03-11
      • 2012-04-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多