SQL: how to alter column size
What SQL sta开发者_开发知识库tement will resize a column in an Access MDB database?
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
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
精彩评论