| List: | MySQL and Java | « Previous MessageNext Message » | |
| From: | Luca Lafranchi | Date: | January 21 2003 7:02pm |
| Subject: | Re: Possible bug in PreparedStatement.setString(int,String) ? | ||
| View as plain text | |||
> Nope. It's a feature. See http://www.mysql.com/doc/en/CHAR.html > > "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 ANSI SQL specification.)" > Ok, but then how do I store and retrieve a string with trailing spaces, given that even with CHAR columns those spaces are "removed upon retrieval"? Thanks Luca
| Thread | ||
|---|---|---|
| • Possible bug in PreparedStatement.setString(int,String) ? | Luca Lafranchi | 21 Jan |
| • Re: Possible bug in PreparedStatement.setString(int,String) ? | Mark Matthews | 21 Jan |
| • Re: Possible bug in PreparedStatement.setString(int,String) ? | Luca Lafranchi | 21 Jan |
| • Re: Possible bug in PreparedStatement.setString(int,String) ? | Mark Matthews | 21 Jan |
| • load file error | Removed | 13 Nov |
| • installation problem | Removed | 13 Nov |
| • Re: Possible bug in PreparedStatement.setString(int,String) ? | Luca Lafranchi | 22 Jan |
