Jump to content


This topic is now archived and is closed to further replies.


Changing Table Properties in SQL

Recommended Posts

I have an existing table set up in my database. I don\'t want to change it but I do want to change the properties within relating to the rounding up of the values where would I go to change that??? I am new to this and have no clue where to look first

Share this post

Link to post
Share on other sites

hmm, well, easiest way is to use phpmyadmin if you have it installed. If your numbers are rounding and you don\'t want them too, change the field from int to float. Or if they don\'t round and you want them to, switch them around hehe.


If you don\'t have access to phpmyadmin then you can try changing it with the alter command, should back up the database first just in case though :)


something like:

ALTER TABLE mytable CHANGE column_name column_name FLOAT NOT NULL;


That will change the column named column in the table called mytable to a float type


Hope that helps :)

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.