SYSDATE
을 추가하여 테이블 이름을 변경하고 싶습니다. 예를 들어 EXAMPLE_TABLE
테이블을 EXAMPLE_TABLE_05_01_2015
으로 변경하려고하지만 SYSDATE
에서 날짜를 가져 오려고합니다. sysdate로 테이블 이름을 변경하십시오.
ALTER TABLE "MYDB"."EXAMPLE_TABLE" rename to (SELECT 'EXAMPLE_TABLE' || TO_CHAR(SYSDATE, '_dd_MM_yyyy') FROM DUAL);
내가이 일을 어떻게 할 수 있습니까?
SQL Error: ORA-14047: ALTER TABLE|INDEX RENAME may not be combined with other operations
14047. 00000 - "ALTER TABLE|INDEX RENAME may not be combined with other operations"
*Cause: ALTER TABLE or ALTER INDEX statement attempted to combine
a RENAME operation with some other operation which is illegal
*Action: Ensure that RENAME operation is the sole operation specified in
ALTER TABLE or ALTER INDEX statement;
당신을 돌려 보내는 것은 어떤 오류입니까? – rtome
'SQL * Plus'에서'variable substitution '을 사용하여이 작업을 수행 할 수 있습니다. 내 대답을 보라. –