문제

I need to add a table to Oracle SQL Database that takes current system time and I keep getting issues with:

"00907. 00000 - "missing right parenthesis"".

I need two columns one that takes the current sysdate and the other to take a date

ALTER TABLE <TableName>
ADD (<Colum1> TO_DATE(SYSDATE, 'dd/mm/yyyy'), <Column2> TO_DATE('yyyy/mm/dd'));
도움이 되었습니까?

해결책

Assuming that your current table's name is mytable, try this:

ALTER TABLE mytable ADD (current_date DATE DEFAULT SYSDATE, mydate DATE);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top