摘要:
CREATE TABLE `test` ( `id` INT(20) NOT NULL AUTO_INCREMENT, `name` VARCHAR(20) NULL DEFAULT NULL, `age` INT(5) NULL DEFAULT NULL, PRIMARY KEY (`id`))COLLATE='utf8_general_ci'ENGINE=InnoDB 查询出所有重复的记录 ,删除所有 select a.* 换成deleteselect a.* from test a join (select name,count(*) from test group by 阅读全文
摘要:
create table test1(id number,name varchar2(20)); insert into test1 values(1,'jack');insert into test1 values(2,'jack');insert into test1 values(3,'peter');insert into test1 values(4,'red'); insert into test1 values(5,'green'); insert into test1 values(6,'g 阅读全文
摘要:
select * from EB where exists (select * from BB where Code=EB.Code)把select 外层表EB看成是循环的,把每一个值eb.code传到里面去测试,为真刚返回结果这一条 阅读全文