Mysql out of range value adjusted for column

Im trying to copy a phone number feild away to a temp field

ALTER TABLE customers ADD tempF1 int(30) ;  <=== adding the temp field
UPDATE customers SET tempF1 = phone1;         <=== adding the phone numbers into temp feild

All my numbers get the error
'Out of range value adjusted for column tempF1' at row 14
'Out of range value adjusted for column tempF1' at row 15
'Out of range value adjusted for column tempF1' at row 16

and then all my mobile numbers LOOSE the leading '0'





what do i need to do to beable to store this correctly


Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

kingjelyAuthor Commented:

I have tried text

ALTER TABLE customers ADD tempF1 text(30) not null ;
UPDATE customers SET tempF1 = phone1;      

which works, but i get this little FILESEARCH icon in tempF1, and if i click on it, it takes me to a file to save too?

Anyone seen this before, please help!

Have you tried char(30) or varchar(30) a a datatype?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
For phone type of fields, you have to use varchar or char datatype.  This will help you to store data in formated way like nnn-nnn-nnnn or (nnn) nnn-nnnn or '0' prefixed or any format.

There is no advantage of keeping phone feilds numeric
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

kingjelyAuthor Commented:
Tis didnt really work, but  have tested on other tables and it worked  so thanks
theGhost_k8Database ConsultantCommented:
Well as such this is PAQed though, just FYI::
" If you specify ZEROFILL for a numeric column, MySQL automatically adds the UNSIGNED attribute to the column. "

kingjelyAuthor Commented:

Hi sorry Kate, , There answer worked But just not for my case.. SO i assume its something I did wrong.

Thanks heaps for this info, trust me i read it all( or try to)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MySQL Server

From novice to tech pro — start learning today.