mysql - Add a constraint so one date is not less than or equal to the other date in the same table in MySQL
问题描述
I am on Server version: 5.6.10-log - MySQL Community Server (GPL)
When I try to add this constrain I don't get an error, but it doesn't prevent the dates from failing the rule:
ALTER TABLE events ADD CONSTRAINT check_dates check (events.end_datetime <= events.extended_end_datetime);
Is it my server version? Is there any way to do this on my current version of mysql?
解决方案
推荐阅读
- docker - LocalStack 卡在“等待所有 LocalStack 服务准备就绪”消息中
- openfeign - 开放的伪装类线程是否保存?(GsonDecoder, OkHttpClient)
- gitlab - 如果外部 url 没有改变,gitlab runners 是否需要在迁移后重新注册?
- node.js - 在 linode 虚拟主机上部署 node js/express web 应用程序
- c# - 编写 DbContext 扩展方法
- .net-core - MSBuild .NET Core 3.1 应用程序 - 在 csproj 中设置 PublishDir 值
- angularjs - 如果数据太长,Angularjs $http 不起作用
- java - 可能有许多 ArrayList 的 ArrayList
- haskell - haskell 中的零阶函数
- java - 在 Mac OS 上通过 Intellij 启动锻造时收到奇怪的错误