Incorrect table definition; there can be only one auto column and it must be defined as a key

简介: Incorrect table definition; there can be only one auto column and it must be defined as a key

问题

我们在新建数据库表的时候保存会报错,原因就是没有添加约束主键,就会报这个问题。



解决

在对应的表添加约束主键

d2aae443fbb644bb8bf28f09b9b41d5b.png




目录
打赏
0
0
0
0
21
分享
相关文章
实时计算 Flink版操作报错之遇到 "The column 'AdminCode' is referenced as PRIMARY KEY, but a matching column is not defined in table 'tx.dbo.MS_tkBa'!" 是什么情况
在使用实时计算Flink版过程中,可能会遇到各种错误,了解这些错误的原因及解决方法对于高效排错至关重要。针对具体问题,查看Flink的日志是关键,它们通常会提供更详细的错误信息和堆栈跟踪,有助于定位问题。此外,Flink社区文档和官方论坛也是寻求帮助的好去处。以下是一些常见的操作报错及其可能的原因与解决策略。
View ‘information_schema.SCHEMATA‘ references invalid table(s) or column(s) or function(s) or define
View ‘information_schema.SCHEMATA‘ references invalid table(s) or column(s) or function(s) or define
291 0
超详细!Mysql错误1452 - Cannot add or update a child row: a foreign key constraint fails 原因及解决方法
超详细!Mysql错误1452 - Cannot add or update a child row: a foreign key constraint fails 原因及解决方法
4327 0
超详细!Mysql错误1452 - Cannot add or update a child row: a foreign key constraint fails 原因及解决方法
[Err] 1294 - Invalid ON UPDATE clause for 'comment_time' column【详细解决办法】
[Err] 1294 - Invalid ON UPDATE clause for 'comment_time' column【详细解决办法】
770 0
[Err] 1294 - Invalid ON UPDATE clause for 'comment_time' column【详细解决办法】
Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT
Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT
How do you create a DynamicResourceBinding that supports Converters, StringFormat?
原文 How do you create a DynamicResourceBinding that supports Converters, StringFormat? 2 down vote accepted In the past I've resorted to using se...
943 0
AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等