Page 1 of 1
Need to add default text value
Posted: Sun Feb 15, 2009 10:26 am
by bulgin
Using phpMyAdmin - 2.11.8.1deb1 and Ver 14.12 Distrib 5.0.67, for debian-linux-gnu (i486) using readline 5.2, and I cannot create a text field that will have a default value of "Please contact the business office for further information at xxx-xxx-xxxx. Thank you." -- you get the idea.
How does one go about creating a text field in MySQL that will contain a default value every time a record is added?
Thanks!
Re: Need to add default text value
Posted: Sun Feb 15, 2009 1:23 pm
by califdon
bulgin wrote:Using phpMyAdmin - 2.11.8.1deb1 and Ver 14.12 Distrib 5.0.67, for debian-linux-gnu (i486) using readline 5.2, and I cannot create a text field that will have a default value of "Please contact the business office for further information at xxx-xxx-xxxx. Thank you." -- you get the idea.
How does one go about creating a text field in MySQL that will contain a default value every time a record is added?
Thanks!
If you're using phpMyAdmin, you should be able to enter a default value without any problem. What isn't working?
If you want to do it in SQL, that's pretty straightforward, too. Something like:
Code: Select all
...
myText VarChar(255) Default "Please contact ..."
Describe what you've tried that doesn't work, and how it doesn't work.
Re: Need to add default text value
Posted: Sun Feb 15, 2009 3:19 pm
by bulgin
working now -- I didn't put in the max characters allowed. I wouldn't have known about that unless you had shown me how to do it with sql.
All fixed.
thanks!
