Jump to content

modify a field throughout a table


wompus

Recommended Posts

I just started learning mysql today so this might sound stupid.

I have a field in a table called id. I would like to add a the number 0 before

each value in this field. How can i do this throughout the whole table?

Thanks

Link to comment
Share on other sites

OK. I use this field to sort entries in an online journal. I was fine till i hit 100 entries. Now when I sort in descending order, entry #100 ends up with entry #10. If I could put an extra zero infront of every entry number currently in the table it will fix this. I have no problem entering data into this table in the correct format. My question is, can I add the number 0 before every value in a specified column or do i have to edit each one using phpmyadmin.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.