Jump to content

Archived

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

smith.james0

Moving db colums to a different table

Recommended Posts

Hi
I need to move two columns (area_servicability, company_servicability) to a new table without lossing the data, is this possible in php admin?

Second question If i change the column type will it keep all the date? (varchar(200) change to int(5,2))

Thanks James

Share this post


Link to post
Share on other sites
James, If you have phpMyAdmin, select the table you want to move/copy, select Operations on the top, go to Copy table to (database.table): select the database you would like it to be copied to, type in the name of the table, make sure you have structure and data selected and push go!

If you don't have phpMyAdmin, either install it or let me know and I can give you the sql query.

hope this helped,
-Chris

Share this post


Link to post
Share on other sites
Copy the whole table and then delete the columns you don't want.

Ken

Share this post


Link to post
Share on other sites
[quote author=smith.james0 link=topic=99806.msg393225#msg393225 date=1152295491]
Second question If i change the column type will it keep all the date? (varchar(200) change to int(5,2))
[/quote]

valid integer values should be retained. What is int(5,2)?

Share this post


Link to post
Share on other sites
[quote author=Barand link=topic=99806.msg393477#msg393477 date=1152349816]
[quote author=smith.james0 link=topic=99806.msg393225#msg393225 date=1152295491]
Second question If i change the column type will it keep all the date? (varchar(200) change to int(5,2))
[/quote]

valid integer values should be retained. What is int(5,2)?
[/quote]

I believe int(5,2) would be an integer of that is 5 characters long with 2 decimals - but then it's a float and not an integer :S ???

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.