我想转换这个 Microsoft SQL Server 触发器
ALTER TRIGGER [dbo].[trg_EliminoItems]
ON [dbo].[PedidosEncabezado]
INSTEAD OF DELETE
AS
BEGIN
SET NOCOUNT ON;
insert into HistPedidosEncabezado select * from PedidosEncabezado where PedidosID in ( select PedidosID from deleted )
insert into HistPedidosItems select * from PedidosItems where PedidosID in ( select PedidosID from deleted )
delete from PedidosItems where PedidosID in ( select PedidosID from deleted )
delete from PedidosEncabezado where PedidosID in ( select PedidosID from deleted )
END
进入 SQLite。