Forum Moderators: coopster & phranque

Message Too Old, No Replies

What string type to use? varchar is too small.

         

webguru

8:03 am on Apr 20, 2003 (gmt 0)

10+ Year Member



i'm using varchar for one of the columns.

varchar can only go up to 255 bytes, i.e. varchar(255) it can't go any higher.

I need this column to hold more than 255. What other string type should I use?

this is for MySQL. (possibly portable to Oracle later on).

wruk999

8:55 am on Apr 20, 2003 (gmt 0)

10+ Year Member



Hi webguru,

Have a look at this page of the MySQL manual:
6.2 Column Types [mysql.com].

Have you thought about the 'text' type?

wruk999

jatar_k

3:55 pm on Apr 20, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



How long is the largest piece of data that you are going to store?

In Oracle varchar2 maxes at 2000 (I think) so that should do but TEXT or BLOB is probably the way to go in mysql.

senior mcinvale

4:42 pm on Apr 21, 2003 (gmt 0)

10+ Year Member



use text.

also, you may want to consider uppercasing all your table & column names since oracle does this.