Pooly wrote:
Damnit !
Thanks for pointing it, I forgot these things.
But it's a bit more subtle :
If any column in a table has a variable length, the entire row becomes
variable-length as a result. Therefore, if a table contains any
variable-length columns (VARCHAR, TEXT, or BLOB), all CHAR colu
Yeah, for example the last statement ALTER, ..., ...
is the only way sometimes to make things working.
anyway, it's worth knowing it.
2005/8/13, Chris Elsworth <[EMAIL PROTECTED]>:
> On Sat, Aug 13, 2005 at 05:37:56PM +0100, Pooly wrote:
> > Damnit !
> > Thanks for pointing it, I forgot these
On Sat, Aug 13, 2005 at 05:37:56PM +0100, Pooly wrote:
> Damnit !
> Thanks for pointing it, I forgot these things.
> But it's a bit more subtle :
[snip]
Bah, should have waited another 5 minutes before I bothered posting my
last long-winded ramble ;)
> ALTER TABLE sessions MODIFY id char(32) NOT
On Sat, Aug 13, 2005 at 04:01:38PM +0100, Pooly wrote:
>
> ALTER TABLE sessions MODIFY ip char(8) NOT NULL DEFAULT '0';
> ALTER TABLE sessions MODIFY id char(32) NOT NULL DEFAULT '';
Hello,
Since you have two varchar columns, I don't think there's any way to
convert them both to char without dro
Damnit !
Thanks for pointing it, I forgot these things.
But it's a bit more subtle :
If any column in a table has a variable length, the entire row becomes
variable-length as a result. Therefore, if a table contains any
variable-length columns (VARCHAR, TEXT, or BLOB), all CHAR columns
longer than
Pooly wrote:
Hi,
I try to convert a varchar to a char, but it doesn't seems to work.
From the manual: "...all CHAR columns longer than three characters are
changed to VARCHAR columns."
http://dev.mysql.com/doc/mysql/en/silent-column-changes.html >
--
Roger
--
MySQL General Mailing List
F
Hi,
I try to convert a varchar to a char, but it doesn't seems to work.
show create table sessions;
CREATE TABLE `sessions` (
`id` varchar(32) NOT NULL default '',
`user_id` int(6) NOT NULL default '0',
`ip` varchar(8) NOT NULL default '0',
`lastseen` timestamp NOT NULL default CURRENT_
> > > > I have a questions about "varchar columns" change to "CHAR columns"
> > > > automatically.
>
> > > See http://dev.mysql.com/doc/mysql/en/Silent_column_changes.html
>
> > In addition to that - it doesn't really matter as the CHAR datatype
> > isn't properly implemented in MySQL and behaves t
On Mon, 23 Aug 2004 15:25:21 +0200, Martijn Tonies <[EMAIL PROTECTED]> wrote:
> > > I have a questions about "varchar columns" change to "CHAR columns"
> > > automatically.
> > See http://dev.mysql.com/doc/mysql/en/Silent_column_changes.html
> In addition to that - it doesn't really matter as th
> > I have a questions about "varchar columns" change to "CHAR columns"
> > automatically.
>
> See http://dev.mysql.com/doc/mysql/en/Silent_column_changes.html
In addition to that - it doesn't really matter as the CHAR datatype
isn't properly implemented in MySQL and behaves the same as
the VARCHA
Emi Lu <[EMAIL PROTECTED]> wrote:
> I have a questions about "varchar columns" change to "CHAR columns"
> automatically.
See http://dev.mysql.com/doc/mysql/en/Silent_column_changes.html
--
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by
This is described here:
http://dev.mysql.com/doc/mysql/en/Silent_column_changes.html. The table is
created as a fixed table format.
-Original Message-
From: Emi Lu
To: [EMAIL PROTECTED]
Sent: 8/16/04 3:20 PM
Subject: Why "VARCHAR" TO "CHAR" automatically when th
Hello all,
I have a questions about "varchar columns" change to "CHAR columns"
automatically.
When I designed a table t1
create table t1(id varchar(3) not null) in MySQL. After that, we use
"desc t1" to see the description of table "t1".
The result is the following:
TED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, June 14, 2002 3:55 PM
Subject: RE: varchar to char ...
> What do you mean by optimization of the column? Are you saying that
> char takes less space than varchar or the performance on char is better
> in queries
bvyas3
> Subject: Re: varchar to char ...
>
>
> Mysql optimizes the column type while creating the table.
>
> Regards,
> Bhavn.
> - Original Message -
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, June 14, 2002 2:26 PM
Mysql optimizes the column type while creating the table.
Regards,
Bhavn.
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 14, 2002 2:26 PM
Subject: varchar to char ...
> Hi guys,
>
> I have a query.I am not sure if this
Hi guys,
I have a query.I am not sure if this is a bug or a feature (ha ha
ha...).
Table - abc
name varchar(30),
address varchar(50)
Then I run this sql.
create table temp_abc as
select * from abc;
datatypes of the columns changes:
Table - temp_abc
name char(30
Description:
e> When attempting to modify a column from varchar(40) to char(40) the command
returns successfully, however the table is unaltered
e> How-To-Repeat:
e> (prepare a table table_name with a column column_name varchar(40)
e> alter table table_name modify column_
e char(40) NOT NULL default '';
describe table_name
>Fix:
alternative right now is to drop the table and recreate it
>Submitter-Id:
>Originator:
>Organization:
IMCB, Singapore
>MySQL support: none
>Synopsis: altering table structure from v
At 9:32 AM +0100 12/12/01, Willem Bison wrote:
>I have a table with several columns of type 'varchar'. How can I change all
>columns to fixed width char's ? Doing a 'alter' from varchar to char has no
>effect since the column is changed back to varchar.
You have
I have a table with several columns of type 'varchar'. How can I change all
columns to fixed width char's ? Doing a 'alter' from varchar to char has no
effect since the column is changed back to varchar.
---
21 matches
Mail list logo