List:General Discussion« Previous MessageNext Message »
From:Martijn Tonies Date:June 18 2009 10:17am
Subject:Re: How to specify CHAR column to accept specific characters
View as plain text  
Hi,

> I'm using MySQL 5.1.
>
> How do we create a constraint on char column to accept only character 
> 'A' -
> 'Z'?

MySQL doesn't have CHECK constraints, I think the only way to do this
is via a BEFORE INSERT trigger.

With regards,

Martijn Tonies
Upscene Productions
http://www.upscene.com

Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!

Database questions? Check the forum:
http://www.databasedevelopmentforum.com 

Thread
How to specify CHAR column to accept specific charactershezjing18 Jun
  • Re: How to specify CHAR column to accept specific charactersMartijn Tonies18 Jun
  • RE: How to specify CHAR column to accept specific charactersJerry Schwartz18 Jun