# Sql alter table

**URL:** <https://forum.kirupa.com/t/sql-alter-table/142233>\
**Category:** Uncategorized\
**Created:** [March 26, 2005, 9:15pm UTC](https://forum.kirupa.com/t/sql-alter-table/142233 "2005-03-26T21:15:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nightshade](https://avatars.discourse-cdn.com/v4/letter/n/41988e/32.png) [@nightshade](https://forum.kirupa.com/u/nightshade)\
**Post date:** [March 26, 2005, 9:15pm UTC](https://forum.kirupa.com/t/sql-alter-table/142233/1 "2005-03-26T21:15:45Z")

</div>

Hi,

I am using the ALTER TABLE function to add a new colomn to my table in MS Access.  
I have absolutely no trouble with:

$sql = “ALTER TABLE downloads ADD “.$file\_x.” varchar(3)”;

But this new column has a text datatype. I need one that only takes numerical values. I have tried:

$sql = “ALTER TABLE downloads ADD “.$file\_x.” int(3)”;  
$sql = “ALTER TABLE downloads ADD “.$file\_x.” integer(3)”;  
$sql = “ALTER TABLE downloads ADD “.$file\_x.” numeric(3,0)”;

but with no effect.

Any ideas?
