Go Back   CodingForums.com > :: Server side development > MySQL

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-21-2002, 08:26 PM   PM User | #1
vikaspa
New Coder

 
Join Date: Oct 2002
Location: Mumbai,India
Posts: 67
Thanks: 0
Thanked 0 Times in 0 Posts
vikaspa is an unknown quantity at this point
Alter Table

CHANGE THE WIDTH OF COULM USING phpMyAdmin


In casea field is varchar I can change its width from 50 to 200 (max 255 is pemitted)

However when I change varchar(200) to Mediumtext(1000) it gives error

as follow :
Error
SQL-query:

ALTER TABLE fm CHANGE suggestion suggestion MEDIUMTEXT (1000)
MySQL said: You have an error in your SQL syntax near '(1000) ' at line 1
Back


I wantr to make the sizie of field 'suggestion' from varchar(200) to 1000 what is the way ?
vikaspa is offline   Reply With Quote
Old 11-25-2002, 04:40 PM   PM User | #2
Spookster
Supreme Overlord


 
Spookster's Avatar
 
Join Date: May 2002
Location: Marion, IA USA
Posts: 6,220
Thanks: 4
Thanked 80 Times in 79 Posts
Spookster will become famous soon enough
Try removing the column and then adding it with the datatype and size that you want.
__________________
Spookster
CodingForums Supreme Overlord
All Hail Spookster
Who gave you that Ugging infraction? Yeah that's right it was me!
Spookster is offline   Reply With Quote
Old 12-03-2002, 02:14 PM   PM User | #3
mbenson
New to the CF scene

 
Join Date: Sep 2002
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
mbenson is an unknown quantity at this point
Re: Alter Table

Quote:
ALTER TABLE fm CHANGE suggestion suggestion MEDIUMTEXT (1000)
MySQL said: You have an error in your SQL syntax near '(1000) ' at line 1
Back


I wantr to make the sizie of field 'suggestion' from varchar(200) to 1000 what is the way ? [/B]

Try not telling it to use mediumtext (1000). MySQL uses that type column as a field up to 16.8MB (16000000 chars or something).

just use:
ALTER TABLE fm CHANGE suggestion suggestion MEDIUMTEXT;
mbenson is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:17 AM.


Advertisement
Log in to turn off these ads.