摘要:
--某个表中的字段及字段类型代码SELECT c.colname, c.coltype,t.owner FROM syscolumns c, systables t WHERE c.tabid = t.tabid AND t.tabname = 'dm_plc_policy' --查看数据库临时表空 阅读全文
摘要:
在几千条记录里,存在着些相同的记录,如何能用SQL语句,删除掉重复的呢?谢谢!1、查找表中多余的重复记录,重复记录是根据单个字段(peopleId)来判断select * from peoplewhere peopleId in (select peopleId from people group ... 阅读全文
摘要:
今天在园子里看到个group by 分组多列统计的例子,转走给大家分享一下:create table tests (year datetime year to year,type char(1),value int);alter table tests alter colomn year int;i... 阅读全文