0

我在专栏中有完整的日期时间ANFISCAL。我想将专栏更新为只有年份。

我用了

UPDATE ANIFISCALI SET ANFISCAL=EXTRACT(YEAR FROM ANFISCAL)

但它不起作用。我收到此错误:

ORA-00932: 不一致的数据类型: 预期的 DATE 得到了 NUMBER

4

1 回答 1

0

When you extract year from a date you are getting a number datatype.

So you are trying to update a column with date datatype with number. so you are getting the error.

ORA-00932: inconsistent datatypes: expected DATE got NUMBER.

于 2015-08-13T07:45:19.723 回答