if not exists (select * FROM _tablas where tabla = 'gen_registroEnvio')
begin  
INSERT INTO [dbo].[_tablas]
           ([tabla]
           ,[esMultiempresa]
           ,[duplicar]
           ,[eliminarIntermedias])
     VALUES
           ('gen_registroEnvio'
           ,1
           ,0
           ,1)

end

go

if not exists (select * FROM _tablas where tabla = 'gen_detalleRegistroEnvio')
begin
INSERT INTO [dbo].[_tablas]
           ([tabla]
           ,[esMultiempresa]
           ,[duplicar]
           ,[eliminarIntermedias])
     VALUES
           ('gen_detalleRegistroEnvio'
           ,1
           ,0
           ,1)
end