XÓA BỎ DÒNG KHÔNG PHÁT SINH
YÊU CẦU
HƯỚNG DẪN
-- chạy select kiểm tra
-- okie thì comment select, mở delete
select t1.ma,t1.ten,t1.VuViec as id_danhmuc, t2.vuviec
-- delete T1
from
(select * from vuviec where vuviec<>0 and cap=0)T1 left join
(
select vuviec
from dulieuketoan
where vuviec<>0
group by vuviec
)T2 on t1.VuViec = t2.VuViec
where t2.VuViec is nullLast updated