Hi,
I would like to know the difference between char, varchar and text.
char limit 255 character fixed length
varchar limit 65,000 character variable length
text limit 65,000 character variable length.
--
Krishna Chandra Prajapati
Suggest you read the online manual...
- Original Message -
*From:* Krishna Chandra Prajapati [EMAIL PROTECTED]
*To:* mysql mysql@lists.mysql.com
*Date:* Tue, 9 Sep 2008 17:54:46 +0530
Hi,
I would like to know the difference between char, varchar and text.
char limit 255
You pretty much answered your own question. A char will always use the
same amount of space (the max size), regardless of how little data you
put in it. A varchar will only use enough space to store the data, so
the amount of space used for each record will be different. You can
also specify a max
Hi Brent,
If i need to create a string column of length 1024 which one is best varchar
or text.
Although both support up to 65534 characters.
create table test1(details varchar(65534), roll varchar(100));(table
cannot be created)
create table test2(details text, roll text);(table
Have you checked the manual to be sure that the 65000 varchar is
available to the version of MySQL you are using? Prior to 5.0.3, it was
255 only.
- Original Message -
*From:* Krishna Chandra Prajapati [EMAIL PROTECTED]
*To:* mysql mysql@lists.mysql.com
*Date:* Tue, 9 Sep 2008
You pretty much answered your own question. A char will always use the
same amount of space (the max size), regardless of how little data you
put in it. A varchar will only use enough space to store the data, so
the amount of space used for each record will be different. You can
also
Hi,
How prior version 5.0.19 stores varchar(1000).
mysql create table ts (name varchar(1000));
Query OK, 0 rows affected (0.09 sec)
mysql show create table ts;
+---++
| Table | Create
Table
|
Thanks a lot.
On Tue, Sep 9, 2008 at 7:35 PM, Martijn Tonies [EMAIL PROTECTED] wrote:
You pretty much answered your own question. A char will always use the
same amount of space (the max size), regardless of how little data you
put in it. A varchar will only use enough space to store the
Message - From: Chris W. Parker
[EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Friday, October 27, 2006 10:35 PM
Subject: Performance of different length/size datatypes
Hello,
Originally I had this long explanation of what I'm doing and why I'm
asking this question but I thought I'd
, October 27, 2006 10:35 PM
Subject: Performance of different length/size datatypes
Hello,
Originally I had this long explanation of what I'm doing and why I'm
asking this question but I thought I'd just cut to the chase and ask...
For a db that doesn't get a lot queries is there much
Hello,
Originally I had this long explanation of what I'm doing and why I'm
asking this question but I thought I'd just cut to the chase and ask...
For a db that doesn't get a lot queries is there much of a performance
difference between BLOB and VARCHAR(255)?
Thanks,
Chris.
--
MySQL General
Chris, it should be noted that a BLOB is binary data, not character
data like VARCHAR. BLOBs will act differently in terms of
case-sensitivity for example. The TEXT data type might be more what
you're looking for.
See http://dev.mysql.com/doc/refman/5.0/en/blob.html
for some more info on BLOB
Is there any command to list all the datatypes available on mysql? I can get
the information about datatypes from mysql manual as well but I need to get
them from mysql command line. Is there any such command available?
--
MySQL General Mailing List
For list archives: http://lists.mysql.com
Can I change the data type of a column in a table from varchar(10) to
smallint(5) unsigned zerofill. The column that is set to varchar(10) is
populated with values from a primary key column in another table that has a
datatype smallint(5) unsigned zerofill and I need to make them both the
same. I
Mark,
Thursday, September 19, 2002, 12:24:45 PM, you wrote:
MC Can I change the data type of a column in a table from varchar(10) to
MC smallint(5) unsigned zerofill. The column that is set to varchar(10) is
MC populated with values from a primary key column in another table that has a
MC
speters,
Friday, August 02, 2002, 3:08:44 AM, you wrote:
s I was wondering about the Enum and Set column types in InnoDB tables.
s I was able to create an InnoDB table with an enum column, but i
s get errors when trying to insert values into that column.
s I'm thinking that InnoDB doesnt
I was wondering about the Enum and Set column types in InnoDB tables.
I was able to create an InnoDB table with an enum column, but i
get errors when trying to insert values into that column.
I'm thinking that InnoDB doesnt support those data types, but the MySQL
interface to InnoDB may have
OK, I cannot find this sql query on the website or in any of my manuals.
I have a table that contains a set datatype eg
CREATE TABLE testjason (
ID int(11) NOT NULL auto_increment,
SomeSetColumn set('a','b','c') NOT NULL default '',
) TYPE=MyISAM;
I neet to perform an UPDATE on this
Hi.
There are no build-in commands or functions to do so, but it is
possbile anyhow. This has been discussed on the list a while ago, so
you'll find it in the archives:
http://lists.mysql.com/cgi-ez/ezmlm-cgi?1:mss:80264
Basically it boild down to using CONCAT/REPLACE (will issue warning
about
Hi, I have a table in a MySQL database where some fields are declared as
unsigned. Example:
CREATE TABLE cities (
City_id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
City_name VARCHAR(50) NOT NULL
}
My problem appears when inside a .xsql file (Oracle XDK), I try to do a
FYI, concerning my previous email, it's solved. I upgraded the JDBC
drivers to the last ones and now it recognizes the unsigned data types.
Great! :-)
David
On Thu, 25 Apr 2002, David Collados Polidura wrote:
Hi, I have a table in a MySQL database where some fields are declared
Hi again i didn't get any feed back regarding MqSql boolean
field/datatype i note that it is evident in version 4.1 my version is
3.23 ok.
Plz advice, as there is nothing in the pdf.manual about bool (boolean
true/false values) Only something is regards to MySql keywords bool.
Thus i have
Chuck,
Maybe it's just me, but I'm not sure what you're asking here.
You wrote:
Hi again i didn't get any feed back regarding MqSql boolean
field/datatype i note that it is evident in version 4.1 my version is
3.23 ok.
http://www.mysql.com/doc/C/o/Column_types.html
BIT
BOOL
At 02:59 PM 3/9/2002, you wrote:
I have a column defined as varchar(255) in my MySql-database. Now I
realized that there's not enough room for my inserts. Is there any chance
to change it's datatype to tinytext without making an entirely new
database and inserting data from the old one to it?
I have a column defined as varchar(255) in my MySql-database. Now I realized
that there's not enough room for my inserts. Is there any chance to change
it's datatype to tinytext without making an entirely new database and
inserting data from the old one to it?
-Jarkko
On Sat, Mar 09, 2002 at 10:59:52PM +0200, Jarkko Toivonen wrote:
I have a column defined as varchar(255) in my MySql-database. Now I
realized that there's not enough room for my inserts. Is there any
chance to change it's datatype to tinytext without making an
entirely new database and
Hi,
I want to convert a MS SQL 7 DB to mysql DB. They make use of sp_addtype to
define user defined data-types in the DB. Does mysql have the possibillity
to define user-defined datatypes? Or is there another way to do it?
greetings,
Patrick
At 04:08 2/19/02 +0100, you wrote:
Your message cannot be posted because it appears to be either spam or
simply off topic to our filter. To bypass the filter you must include
one of the following words in your message:
sql,query
If you just reply to this message, and include the entire text of
Description:
In certain cases the select fails (ie (a) does not return required rows, or (b)
returns non-wanted rows (cannot repeat (b)))
The problem seems to be related to negative values in decimal type fields and in query
against those fields.
the problem is applicable to several 3.22.*
root writes:
Description:
In certain cases the select fails (ie (a) does not return required rows, or (b)
returns non-wanted rows (cannot repeat (b)))
The problem seems to be related to negative values in decimal type fields and in
query against those fields.
the problem is
Hi!
"root" == root [EMAIL PROTECTED] writes:
Description:
root In certain cases the select fails (ie (a) does not return required rows, or (b)
returns non-wanted rows (cannot repeat (b)))
root The problem seems to be related to negative values in decimal type fields and in
query against
31 matches
Mail list logo