= @TableID and syscolumns.name <> @PrimaryKey and systypes.name <> ''sysname''
union
select ''WHERE '' + @PrimaryKey + '' = @'' + @PrimaryKey,(2 * @maxcol) + 4 as colorder
order by colorder
select type from #tempproc order by colorder
drop table #tempproc
/*=======源程序结束=========*/