Craig Johnston
Craig Johnston

Reputation: 807

SQL: how to alter column size

What SQL statement will resize a column in an Access MDB database?

Upvotes: 1

Views: 10045

Answers (2)

Phil
Phil

Reputation: 164767

ALTER TABLE tablename ALTER columnname is the command you want. Syntax may vary depending on your database system.

Edit: Ah Access. In that case, see http://msdn.microsoft.com/en-us/library/bb177883(v=office.12).aspx

Upvotes: 2

Max Kielland
Max Kielland

Reputation: 5841

Example for MySQL on how to change size of a column named baz in table bar in database foo to 20 characters.

ALTER TABLE `foo`.`bar` MODIFY COLUMN `baz` VARCHAR(20)

Check the SQL manual for the exact syntax for your database.

MySQL ALTER manual


Edit: This is for MS ACCESS 2007:

ALTER TABLE Employees ALTER COLUMN Salary CHAR(20);

Got this example from Microsoft

Upvotes: 0

Related Questions