莫浅子 2022-09-26 12:57 采纳率: 92.9%
浏览 28
已结题

数据库操作中代码出现错误

img


create table emp(

       id  int  comment ' 编号',

       workno varchar(10) comment  ' 工号 ',

       name varchar(10)   comment  ' 姓名',

       gender char(1)  comment  '性别',

       age tinyint unsigned comment  ' 年龄',

       idcard char(18) comment  '身份证号',

       entrydate date comment  '入职时间'

)comment  '员工表'
这样输入会报错 ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'entrydate date comment '入职时间'
)comment '员工表'' at line 8
mysql>

  • 写回答

3条回答 默认 最新

  • 一束尘光 2022-09-26 13:18
    关注

    entrydate的类型不对吧,datetime或者timestamp

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

问题事件

  • 系统已结题 10月4日
  • 已采纳回答 9月26日
  • 创建了问题 9月26日

悬赏问题

  • ¥15 求daily translation(DT)偏差订正方法的代码
  • ¥15 js调用html页面需要隐藏某个按钮
  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误
  • ¥15 一道python难题3
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 关于#python#的问题:自动化测试