Hello Lemasson. Monday, December 8, 2003, 8:16:18 PM, you wrote: LS> I have a table witch has a column of type VARCHAR(10) LS> BINARY. When I tried to insert white spaces in it (insert into LS> mytable (mycolumn) values(' ')), an empty String is stored. Why?
This is a documented behavior: Values in VARCHAR columns are variable-length strings. You can declare a VARCHAR column to be any length between 1 and 255, just as for CHAR columns. However, in contrast to CHAR, VARCHAR values are stored using only as many characters as are needed, plus one byte to record the length. Values are not padded; instead, trailing spaces are removed when values are stored. (This space removal differs from the SQL-99 specification.) [taken from 6.2.3.1 The CHAR and VARCHAR Types of MySQL Reference Manual] -- See you, Andrey. [ [EMAIL PROTECTED] | ICQ# 114087545 | 2:5090/[EMAIL PROTECTED] ] ...The best way to hold a man is in your arms. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]