Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MySql Data types

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
I am trying to setup a table in a MySql DB. What is the equivalent of a varchar(4000) in MySql? I need a data type that will handle longer strings than 255 bits.
 
Almost NO database can handle varchar greater than 255.(M/S SQL SERVER, SYBASE, ORACLE(as I recall), MYSQL, and many others can't do this.
On the otherhand, MOST(including MYSQL, M/S SQL SERVER, SYBASE, and ORACLE) can handle TEXT fields that are much larger. Use TEXT! BTW, you can probably go to close to 2GB before any would complain.
 
The 4000 on the varchar(4000) is the Oracle 4000 character limit not 4000 bytes. Do I have to treat the text datatype like a blob or can I just insert and select like a varchar?
 
BLOBS and TEXT in MySQL work the same way any other column works: you can easily SELECT and INSERT. You just can't set a size on them. Each type has a size according to its limit. As I recall, the TEXT column types are sorted and searched in case-insensitive fashion, while BLOBs are case-sensitive.

Spend some time at
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top