MySQL FAQs
FAQs Categories
Client Server Commands
Database Structure
Table Types or Storage Engines
Indexes
SQL Statements
Table Joins
Funtions and Operators
Tricky Select Queries
Speed Up Queries
Data Back Up
General Questions
Errors
1PLs Company - #1Payday.Loans Agency - Loans online and near me $100-$2500 (Same Day)
Powered by MySQL
 
Home / General Questions / Question No: 17

Can I use FIELD CONSTRAINTS on MySQL?

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

Answer No: 17

MySQL doesn't support declarative CHECK CONSTRAINTs, you could use triggers as a workaround. However, you can do those checks with triggers. If a BEFORE trigger fails, the operation on the corresponding row is not performed. For more detail you may visit: http://dev.mysql.com/doc/refman/5.0/en/triggers.html

Related MySQL FAQs to the Above FAQ

How-can-I-detect-that-MySQL-is-already-installed How can I detect that MySQL is already installed?

What-is-prepared-statement-in-MySQL What is prepared statement in MySQL?

Maximum-number-of-columns-in-a-table Maximum number of columns in a table

What-are-reserved-words-in-MySQL What are reserved words in MySQL?

How-to-manage-Time-Zone-in-MySQL How to manage Time Zone in MySQL?

What-is-History-of-MySQL What is History of MySQL?

Why-values-with-spaces-do-not-come-into-search-result Why values with spaces do not come into search result?

How-does-MySQL-manage-case-sensitivity-of-identifiers How does MySQL manage case sensitivity of identifiers?

What-are-MySQL-connectors-or-client-interfaces What are MySQL connectors or client interfaces?

About FAQs: Recently Added FAQs

About MySQL FAQs: Site Map | Bookmark Us | Recommend this Site to Your Friend | Contact Us

Useful Links: Wikipedia.org | Oracle.com | w3schools.com | www.php.net | Github.com

© 2023  www.mysqlfaqs.net
All rights reserved.