56,681
社区成员
发帖
与我相关
我的任务
分享
create table testtable
(id int,
sname char(10),
age int,
ActionFlage char(20),
Actions char(20));
insert into testtable values(
1,'李三',12,'离开动作','关门'),
(2,'李三',12,'进入动作','开门'),
(3,'李四',15,'离开动作','到水'),
(4,'李四',15,'进入动作','开门'),
(5,'李三',15,'离开动作','喝水'),
(6,'李三',15,'进入动作','到水');
select * from testtable;
select * from testtable where id=1;
delete from testtable where sname+age in
(select distinct sname+age from testtable where id=1);