begin
--开启事务
begin tran
--插入
INSERT INTO [DICTIONARY] (TablName,Column_Id,Column_Name)
--数据源
select o.name,c.column_id,c.name
from sys.all_columns c inner join sys.objects o
on c.object_id=o.object_id
where o.name='v_job'
--查询 这里查询结果 检查是否正确 再考虑是否执行提交
select * from [DICTIONARY] order by Id desc
--提交事务
commit
end