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.
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.
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".
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I answered the question
ALTER TABLE abc ADD COLUMN salary number(15, 2);