摘要:
1、删除的表中的主键是另外一个表的外键, 则应该先把外键表中相应的数据删除,才可以删除表中的数据。 2、值 value 1)修改 update student_table set name="老刘" where id=1; 2)删除 delete from student_table where i 阅读全文
摘要:
1、清除表中数据 truncate table table_name;delete * from table_name;注 : truncate操作中的table可以省略,delete操作中的*可以省略 truncate、delete 清空表数据的区别 :1) truncate 是整体删除 (速度较 阅读全文
摘要:
1.原因: 修改表结构 XXX 为 not null 时,表数据 XXX 字 段 存在 null 值。 2.解决: 去掉或修改 带有 null 值 的 ( 需要设置 not null 的) 字段 如: if(refer_average == []): refer_average = 10000 阅读全文
摘要:
1、修改数据库secondary 中 residentialarea 表的 resPropertyCost 字段类型 ALTER TABLE `secondary`.`residentialarea` MODIFY `resPropertyCost` varchar(30) DEFAULT NULL 阅读全文