Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[dtp-dev] SQL statements don't work well.

Hi,

On the SQL Editor, when I execute SQL statments like below, syntax error occurs.

Executes SQL statements like:

   CREATE TABLE test_table (
           aaa INTEGER NOT NULL,
           bbb CHAR NOT NULL
       )
   ALTER TABLE test_table ADD CONSTRAINT unq_bbb UNIQUE (bbb)

Error occurs like:

  "Syntax error: Encountered "ALTER" at line 5, column 1."

Such a sequence, like CREATE TABLE and ALTER TABLE immediately, is not admitted? I checked they work well when CREATE TABLE statement and ALTER TABLE statement
are executed separately like below exsample.

Executes just CREATE TABLE first:

   CREATE TABLE test_table (
           aaa INTEGER NOT NULL,
           bbb CHAR NOT NULL
       )

Executes ALTER TABLE next:

   ALTER TABLE test_table ADD CONSTRAINT unq_bbb UNIQUE (bbb)

I gotta "Succeeded" message at each time.

Best regards,

Takehiro Hosokawa
VALWAY Technology Center, NEC Soft, Ltd.


Back to the top