Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login




Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

could mysql table cell hold unlimited string?

Guest (Visitor) (OP)
24 Apr 02 3:58
I was wondering if a mysql table cell could hold an unlimited length string?  I can't seem to make it hold more than 255 charecters long.  Thanks in advance for any help or suggestions.

CREATE TABLE about (
  data varchar(255) default NULL
);

RedLion (Programmer)
24 Apr 02 6:06
You should use another field type, for example TEXT which can hold as much as you've got free space on your HD. The TEXT field type is also called MEMO (for example in Ms Access).


Charl
KarveR (MIS)
24 Apr 02 14:12
or LONGTEXT which is even bigger ;0)

***************************************
Party on, dudes!

vcherubini (Programmer)
24 Apr 02 16:01
"for example TEXT which can hold as much as you've got free space on your HD."

Well, not exactly. It depends on what bit your Operating System/processor is at. For example, a 64bit processor can hold a field that is 2 terabytes in size, where as with 32 bit, its more like 2 gigabits.

-Vic

vic cherubini
krs-one@cnunited.com

zebedeee (Programmer)
29 Apr 02 16:04
It might be worth seeing this from the MySQL manual for types TEXT and BLOB:

If you want to use GROUP BY or ORDER BY on a BLOB or TEXT column, you must convert the column value into a fixed-length object. The standard way to do this is with the SUBSTRING function. For example:
mysql> select comment from tbl_name,substring(comment,20) as substr
       ORDER BY substr;

If you don't do this, only the first max_sort_length bytes of the column are used when sorting. The default value of max_sort_length is 1024; this value can be changed using the -O option when starting the mysqld server. You can group on an expression involving BLOB or TEXT values by specifying the column position or by using an alias:
mysql> select id,substring(blob_col,1,100) from tbl_name
           GROUP BY 2;
mysql> select id,substring(blob_col,1,100) as b from tbl_name
           GROUP BY b;

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close