Quote:
Originally Posted by Theresonly1
Don't know what is the maximum size i should give to my data-type.
|
Well that should be the max. size of a path in whatever operating system you want the path to be valid. In Windows there is a limit that can probably be found out by searching the Microsoft website. For any *nix system this depends on the file system used.
Quote:
|
2) When comparing CHAR against VARCHAR with '=' sometimes it doesn't work, it says i need a cast.. But when i use the 'LIKE' operator - it works.. Why is that?
|
The CHAR datatype stores values padded with blanks so a CHAR(10) is
always 10 characters long. If you store 'HELLO' into such a column, the DBMS will add 5 spaces to the end of the value.
Those spaces will be taken into account when comparing values ('HELLO' is different from 'HELLO ')
My recommendation: don't use CHAR unless you really know that the length of your data is fixed
and why is that a secret?