3

我需要为数据库中的每个表创建两列 - created_date 和 updated_date。我正在 Oracle 中尝试以下 SQL,但它不起作用:

create table tmptmp (
  id number(10), 
  created TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
  updated TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE TIMESTAMP
);

上面给出了以下错误:

Error at Command Line:5 Column:42
Error report:
SQL Error: ORA-00907: missing right parenthesis
00907. 00000 -  "missing right parenthesis"
*Cause:    
*Action:

任何线索这里有什么问题?

4

0 回答 0