ORACLE:缺少右括号

时间:2017-07-17 17:54:07

标签: sql oracle

ORACLE:缺少右括号

ALTER TABLE PRODUCTS  MODIFY 
(RECEIVED_DATE DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP );

oracle 12c

2 个答案:

答案 0 :(得分:0)

Oracle列定义中没有def collatz(number): if number % 2 == 0: return number // 2 else: return number*3 + 1 number = 0 while number == 0: try: number = int(input('Please enter a number: ')) if number == 0: print('Number must be an integer not equal to zero.') else: while True: number = collatz(number) print(number) if abs(number) == 1 or number == -5 or number == -17: break #Collatz seq ends/enters recurring loop when number hits -17, -5, -1 or 1 except ValueError: print('Number must be an integer.') 子句。甲骨文抱怨,因为它期望在ON UPDATE之后有一个右括号。

答案 1 :(得分:0)

您希望保留上次更新的日期。为此,您需要在表格中使用更新触发器。

检查这个答案。

Updating value via trigger AFTER UPDATE Oracle 11g