摘要:
1.增加字段 alter table docdsp add dspcodechar(200)2.删除字段 ALTER TABLE table_NAME DROP COLUMNcolumn_NAME3.修改字段类型 ALTER TABLE table_name ALTER COLUMNcolumn_n... 阅读全文
摘要:
update sales set sales.adminId = t.adminIdfrom (select a.adminId,a.realName from sales ,admin_administrators as a where sales.salesName = a.realName and a.adminId like '2%') as twhere sales.salesName = t.realName 阅读全文
摘要:
1、查找表中多余的重复记录,重复记录是根据单个字段(peopleId)来判断select * from peoplewhere peopleId in (select peopleId from people group by peopleId having count(peopleId) > 1)2、删除表中多余的重复记录,重复记录是根据单个字段(peopleId)来判断,只留有rowid最小的记录delete from peoplewhere peopleId in (select peopleId from people group by peopleId having count 阅读全文