开发者

SQL: how to alter column size

开发者 https://www.devze.com 2023-01-30 05:02 出处:网络
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.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消