
03/11/2008, 09:47
|
Colaborador | | Fecha de Ingreso: marzo-2008 Ubicación: Sabadell
Mensajes: 4.897
Antigüedad: 17 años Puntos: 574 | |
Respuesta: Campo default en mayusculas Lo del trigger esta bien pero quizas es matar moscas a cañonazos!!!
Tienes la función UPPER
UPPER(str)
Returns the string str with all characters changed to uppercase according to the current character set mapping. The default is latin1 (cp1252 West European).
mysql> SELECT UPPER('Hej');
-> 'HEJ'
This function is multi-byte safe.
Si usas esta funcion en un UPDATE o en el momento del INSERT tendrás lo que buscas...
Quim
Para pasar a minusculas...
LOWER(str)
Returns the string str with all characters changed to lowercase according to the current character set mapping. The default is latin1 (cp1252 West European).
mysql> SELECT LOWER('QUADRATICALLY');
-> 'quadratically'
This function is multi-byte safe. |