|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
I am new and as most of you have already figured out, i have used this forum a lot. Thank you so much for all of the help.
Here is another question: How do you change the field type? I have a field Verified with data type tinyint(1) that can be null and its default is null. How can I change that to "bit not null default 0"???? here is the code that MawlRats gave me: create table test ( myField bit not null default 0 ); I am running MySQL v3.23.49 with MyODBC v2.51 on Windows XP Professional. Thank you for any assistance, AP |
|
#2
|
|||
|
|||
|
Hi,
You need to use the alter tabe command: alter table test change myField myField tinyint(1); so its alter table [tableName] change [field name] [new field name] [field options] hope this helps |
|
#3
|
|||
|
|||
|
if your not to sure about mysql, use a script called phpmyadmin (you have to have php 4 installed to use it) this program takes care of your mysql database with a friendly interface.
im not to sure where to download it from, but goto scriptsearch.com and take a look their hope this helps |
|
#4
|
|||
|
|||
|
Thanks mytch! That works perfectly!
AP |
![]() |
| Viewing: Dev Articles Community Forums > Databases > General SQL Development > Change Field Type |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|