我在MySQL中有一张表。我想将表的列值设置为常量整数。我该怎么做? 最佳答案 UnfortunatelyMySQLdoesnotsupportSQLcheckconstraints.YoucandefinetheminyourDDLqueryforcompatibilityreasonsbuttheyarejustignored.YoucancreateBEFOREINSERTandBEFOREUPDATEtriggerswhicheithercauseanerrororsetthefieldtoitsdefaultvaluewh