Jump to content


Changing Table Properties in SQL

  • Please log in to reply
1 reply to this topic

#1 Jillianxad

  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 08 August 2003 - 04:23 PM

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

#2 DylanBlitz

  • Members
  • PipPipPip
  • Advanced Member
  • 99 posts
  • LocationOC Baby!

Posted 10 August 2003 - 09:27 AM

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 :)

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users