Link to home
Start Free TrialLog in
Avatar of AugustineWan
AugustineWan

asked on

Alter Table Add Column

Hi:
I have an Access Query that adds a new column to an existing table.  My code is:

ALTER TABLE abc ADD COLUMN salary number;

However, I also wanted to include the following format for the datatype "number":

FieldSize = Decimal
Format = Fixed
Precision = 13
Scale = 2
Decimal Places = 2

Is there a way to include these specifications in the query?  I know I can change the settings manually in the Access table afterwards but since the query is run inside a VBA (stand alone project), no user override is alowed.
Avatar of william_jwd
william_jwd
Flag of United States of America image

try,

ALTER TABLE abc ADD COLUMN salary number(15, 2);
Avatar of AugustineWan
AugustineWan

ASKER

I tried:

ALTER TABLE abc ADD COLUMN salary number(15, 2); and
ALTER TABLE abc ADD COLUMN salary number(15. 2);

Both gave me "Syntax Error".
ASKER CERTIFIED SOLUTION
Avatar of Sethi
Sethi
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I answered the question