打印本文 打印本文 关闭窗口 关闭窗口
MS SQLSERVER 中如何得到表的创建语句
作者:武汉SEO闵涛  文章来源:敏韬网  点击数3803  更新时间:2007/11/14 10:58:48  文章录入:mintao  责任编辑:mintao
taLength(@IndDesc) - 1 )
      Select @Script = @Script + '''' WITH '''' + @IndDesc
    end
    /*
 **  Add the location of the data.
    */
    if @Segment <> 1
      select @Script = @Script + '''' ON '''' + name
  from syssegments
  where segment = @Segment
  end
  if (@strPri_Key = '''''''')
    Insert into #spscript values(@Script,0)
  else
    update #spscript set Script = Script + @strPri_Key where LastLine = 1
 
  Fetch Next from Cursor_Index into @ColName, @IndID, @IndStatus, @Segment
end
Close Cursor_Index
Deallocate Cursor_Index

Select Script from #spscript order by id

set nocount off

return (0)

 

上一页  [1] [2] [3] 

打印本文 打印本文 关闭窗口 关闭窗口