gridview 的级联删除
create table author
(
id int primary key ,
auname char(10)
)
create table book
(
id int primary key ,
fid int,
booname char(10)
)
alter table book add constraint fk_id foreign key (fid) references author(id)
insert into author values(1,'tom')
insert into author values(2,'lily')
insert into book values(1,1,'java')
insert into book values(2,1,'C#')
insert into book values(3,2,'jsp')
insert into book values(4,2,'C++')
select * from author
select * from book
delete from author
where id in (SELECT id FROM author start WITH id = 1 CONNECT BY fid = Prior id)
这一段代码是我在网上找的,我不知道是什么意思
如果我想删除 id :1 的作者 应该怎么写sql语句