Oracle error : ORA-00905: Missing keyword

test picture test · Nov 20, 2008 · Viewed 152.4k times · Source

Excuting the line of SQL:

SELECT * 
  INTO assignment_20081120 
  FROM assignment ;

against a database in oracle to back up a table called assignment gives me the following ORACLE error: ORA-00905: Missing keyword

Answer

Justin Cave picture Justin Cave · Nov 20, 2008

Unless there is a single row in the ASSIGNMENT table and ASSIGNMENT_20081120 is a local PL/SQL variable of type ASSIGNMENT%ROWTYPE, this is not what you want.

Assuming you are trying to create a new table and copy the existing data to that new table

CREATE TABLE assignment_20081120
AS
SELECT *
  FROM assignment