0

I am using the dbVisualizer to handle tables in my database, I want to clone a table. This is what I am using:

CREATE TABLE TIMEREPORT.MANAGER_CONFIRMATION_CRITERIA AS 
  (SELECT * FROM TIMEREPORT.MANAGER_CRITERIA);

But it gives me an error:

10:34:03 [CREATE - 0 row(s), 0.000 secs] [Error Code: -5590, SQL State: 42590] unexpected end of statement: required: WITH

What am I missing?

slavoo
  • 5,798
  • 64
  • 37
  • 39
David Karlsson
  • 9,396
  • 9
  • 58
  • 103
  • SELECT * INTO TIMEREPORT.MANAGER_CONFIRMATION_CRITERIA FROM TIMEREPORT.MANAGER_CRITERIA; does not work either, expects FROM...INTO – David Karlsson Sep 18 '13 at 08:45
  • 1
    dbVisualizer is not a DBMS. What's your database system? If this was a Teradata there must be WITH DATA or WITH NO DATA. – dnoeth Sep 18 '13 at 08:46
  • Do you want to create a table from an existing table with data? – Dhwani Sep 18 '13 at 09:04
  • You may have to create the table first, then do INSERT INTO "TIMEREPORT.MANAGER_CONFIRMATION_CRITERIA" SELECT * FROM "TIMEREPORT.MANAGER_CRITERIA" – twoleggedhorse Sep 18 '13 at 09:12

1 Answers1

1

Please read the Guide.

http://www.hsqldb.org/doc/2.0/guide/databaseobjects-chapt.html#dbc_table_creation

You need to specify WITH DATA or WITH NO DATA at the end of the statement.

fredt
  • 24,044
  • 3
  • 40
  • 61