DATATYPES

2008-09-09 Thread Krishna Chandra Prajapati
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

Re: DATATYPES

2008-09-09 Thread Terry Riley
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

Re: DATATYPES

2008-09-09 Thread Brent Baisley
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

Re: DATATYPES

2008-09-09 Thread Krishna Chandra Prajapati
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

Re: DATATYPES

2008-09-09 Thread Terry Riley
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

Re: DATATYPES

2008-09-09 Thread Martijn Tonies
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

Re: DATATYPES

2008-09-09 Thread Krishna Chandra Prajapati
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 |

Re: DATATYPES

2008-09-09 Thread Krishna Chandra Prajapati
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

Re: Performance of different length/size datatypes

2006-10-31 Thread Paul McCullagh
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

Re: Performance of different length/size datatypes

2006-10-30 Thread Visolve DB Team
, 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

Performance of different length/size datatypes

2006-10-27 Thread Chris W. Parker
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

Re: Performance of different length/size datatypes

2006-10-27 Thread Dan Buettner
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

Retrieving list of all datatypes from mysql command line

2005-07-11 Thread Farheen Jafri
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

Changing datatypes

2002-09-19 Thread Mark Colvin
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

re: Changing datatypes

2002-09-19 Thread Egor Egorov
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

Re: InnoDB enum and set datatypes

2002-08-02 Thread Victoria Reznichenko
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

InnoDB enum and set datatypes

2002-08-01 Thread speters
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

Anyone know how to update SET datatypes

2002-05-30 Thread Jason
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

Re: Anyone know how to update SET datatypes

2002-05-30 Thread Benjamin Pflugmann
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

Select returns negative values for unsigned datatypes using XSQL

2002-04-25 Thread David Collados Polidura
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

Re: Select returns negative values for unsigned datatypes using XSQL

2002-04-25 Thread David Collados Polidura
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

regarding MySql boolean field/datatypes is there a equvilent bool

2002-04-02 Thread Chuck Amadi
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

Re: regarding MySql boolean field/datatypes is there a equvilent bool

2002-04-02 Thread Joel Rees
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

Re: Changing datatypes on the fly?

2002-03-11 Thread BD
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?

Changing datatypes on the fly?

2002-03-09 Thread Jarkko Toivonen
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

Re: Changing datatypes on the fly?

2002-03-09 Thread Jeremy Zawodny
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

user-defined datatypes

2002-03-01 Thread Patrick de Beer
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

Re: MySQL TEXT datatypes and multiple tables

2002-02-19 Thread Scalper
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

select bug concerning decimal datatypes and negative values

2001-01-15 Thread root
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.*

Re: select bug concerning decimal datatypes and negative values

2001-01-15 Thread Sinisa Milivojevic
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

patch: select bug concerning decimal datatypes and negative values

2001-01-15 Thread Michael Widenius
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