create table #IndexTable(NID int)  --创建一个临时表--插入数据
INSERT INTO #IndexTable(NId) EXEC('SELECT ModuleCode FROM SModule')