vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi. I'm looking for using FIELD CONSTRAINTS on Mysql but I can´t find it ... Doesn´t Mysql implement it?? For example: age int > 0 Thanks, RAUL DUQUE Bogotá, Colombia --------------------------------- Do You Yahoo!? La mejor conexión a Internet y 2GB extra a tu correo por $100 al mes. http://net.yahoo.com.mx |
| |||
| In the last episode (Feb 25), Raúl Andrés Duque Murillo said: > I'm looking for using FIELD CONSTRAINTS on Mysql but I can't find > it ... Doesn't Mysql implement it?? > > For example: > age int > 0 You can do those checks with triggers: http://dev.mysql.com/doc/refman/5.0/en/triggers.html # If a BEFORE trigger fails, the operation on the corresponding row is not performed. -- Dan Nelson dnelson@allantgroup.com |
| ||||
| Hi, > I'm looking for using FIELD CONSTRAINTS on Mysql but I can´t find it ... Doesn´t Mysql implement it?? > > For example: > age int > 0 MySQL doesn't support declarative CHECK CONSTRAINTs, you could use triggers as a workaround. 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 |