From: Martijn Tonies Date: May 19 2006 3:46pm Subject: Re: how to default column value to lower( ) List-Archive: http://lists.mysql.com/mysql/198110 Message-Id: <05ef01c67b5b$77312e30$cd02a8c0@martijnws> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit > I have column and I want to make sure the db is always making sure the value > that gets input into this VARCHAR() column is always lowercase; > > Is there a way to set the value of a column within a table to automatically > be lowercase. I know how to use the LOWER() function when performing queries > but is there a way to define LOWER( ) within the definition of the table > column itself without having the application specify LOWER( ) to any value > passed to this column or if a record had to be manually input and the admin > forgot to make sure all the characters were lowercase. If you're using MySQL 5, you could do this with a trigger. Martijn Tonies Database Workbench - development tool for MySQL, and more! Upscene Productions http://www.upscene.com My thoughts: http://blog.upscene.com/martijn/ Database development questions? Check the forum! http://www.databasedevelopmentforum.com