Hi Michael, 

>ALTER TABLE "DBA"."A_PERSON" ADD ("COMMENT2"    LONG ASCII DEFAULT '')
><<<
>
>the error
>
> >>>
>---- Error -------------------------------
>Auto Commit: On, SQL Mode: Internal, Isolation Level: Committed
> General error;-7035 POS(32768) DEFAULT specification not allowed for 
>this column:COMMENT2
>ALTER TABLE "DBA"."A_PERSON" ADD ("COMMENT2"    LONG ASCII DEFAULT '')
><<<
>

You can't add a long column with a default value in one step. You can
however add a long column and then modify its default value like this:

ALTER TABLE "DBA"."A_PERSON" ADD ("COMMENT2"    LONG ASCII)
ALTER TABLE "DBA"."A_PERSON" MODIFY "COMMENT2" DEFAULT '')

However, the default will only be used for *new* rows, existing rows
will still have the NULL value. Unfortunately, you cannot update those
values from SQLStudio since updates on longs with literals are not
supported yet. Instead you have to do this via an interface and prepared
statements.

HTH,

Martin.

SAP Labs, Berlin.

--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to