Nelson,
> I appriciate u reply, thank u.
>
> I try the sql statement which u commented then how to solve not null
> problem.
>
> ALTER TABLE king ADD CONSTRAINT king_PK
> PRIMARY KEY (vb1, vb2);
>
> Error hit during execute this command
> Number: -2147467259
>
> Description: Error while executing the query;
> ERROR: Existing attribute "vb1" cannot be a PRIMARY KEY because it
> is
> not marked NOT NULL
> ---------------------------
> OK
> ---------------------------
>
> i try to use command below but no function, kindly command.
>
> ALTER TABLE table_name
> ALTER COLUMN column_name INT NOT NULL
Regrettably, this function of the ALTER TABLE command is currently not
supported in PostgreSQL. In order to mark a column as NOT NULL, you
must:
1) make sure to remove all NULLs from the column, and
2) modify the system tables to set the column NOT NULL.
Hopefully someone will post more detailed instructions on step 2), as I
cannot remember them right now.
-Josh