惯用sql脚本模板

常用sql脚本模板1,建新表:USE MASTERGOif exists(select * from tempdb..sysobjects where idobject_id(

常用sql脚本模板

1,建新表:

USE MASTER  GO     if exists(select * from tempdb..sysobjects where id=object_id('tempdb..#tmpResult'))  begin      drop table #tmpResult  end    create table #tmpResult  (      DbName varchar(100),      SpOrViewName varchar(100),      [Type] varchar(2),      Content varchar(100)  )  go