Page 1 of 1

How to ALTER a Column using ADS SQL

Posted: Sun Oct 01, 2023 7:47 pm
by rdonnay
The Advantage documentation for ALTER TABLE ALTER COLUMN is terrible.

I want to use SQL to change a field name but cannot figure out a syntax that works.

We have a lot of fields in a lot of tables that need to be changed from USER to USR.

Any ideas?

Re: How to ALTER a Column using ADS SQL

Posted: Sun Oct 01, 2023 8:00 pm
by rdonnay
It took a while to figure out that the column names must be quoted. I had to look in my SqlQuery.prg code to see how I did it 2 years ago.

I forgot.

This is correct syntax:

ALTER TABLE mn_drv
ALTER COLUMN "user" "usr" char(10)

Re: How to ALTER a Column using ADS SQL

Posted: Mon Oct 02, 2023 4:42 am
by Tom
The Advantage documentation for ALTER TABLE ALTER COLUMN is terrible.
This is true for the complete documentation.