Skip to content
Advertisement

Oracle copy data to another table

In the Oracle, I copy data from a backup to a new table, it doesn’t work.

what is the correct syntax ?

Thanks

select CODE, MESSAGE into EXCEPTION_CODES (CODE, MESSAGE)
from Exception_code_tmp

the error is

**SQL Error: ORA-00905: missing keyword
00905. 00000 -  "missing keyword"**

Advertisement

Answer

You need an INSERT ... SELECT

INSERT INTO exception_codes( code, message )
  SELECT code, message
    FROM exception_code_tmp
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement