insert into yanzheng(xinxiang) values ('a@163.com')
也就是不给前两个字段赋值
在使用mysql时,有时候会遇到插入空日期的方法,比如col_date这个列属性是日期,可以为空(null),这时候如果我们想直接插入空日期,可以直接这么写:insert into table table1 (col_date)values(null)
当然也可以更新空日期:
update table table1 set col_date = null where id = 1
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)